Closed veksha closed 2 years ago
let html = """ <td class="some"> <a href=""> <span><b>text1</b></span> <b>text2</b> </a> </td> """ import xmltree, htmlparser, streams, nimquery let xml = parseHtml(newStringStream(html)) echo xml.querySelectorAll("b")
output: @[<b>text2</b>, <b>text1</b>] expected: @[<b>text1</b>, <b>text2</b>]
@[<b>text2</b>, <b>text1</b>]
@[<b>text1</b>, <b>text2</b>]
BTW: what is the difference between using newStringStream and not using it for parseHtml? i found that some htmls not parsed correctly if you omit newStringStream.
Is an update being worked on for this? I'd really like to use this lib for a parsing engine
output:
@[<b>text2</b>, <b>text1</b>]
expected:@[<b>text1</b>, <b>text2</b>]
BTW: what is the difference between using newStringStream and not using it for parseHtml? i found that some htmls not parsed correctly if you omit newStringStream.