Closed grazil closed 6 years ago
yes, thanks for your work ! Quick question (or feature request ?), how can we get the text of an element ? Maybe with xmltree.text ? I tried
let xml = parseHtml(newStringStream(html))
let elements = xml.querySelectorAll("tbody tr .Title a")
for i in 0..3:
echo elements[i].text # does not work
You can user the innerText
property.
You will find all the informations for this lib in this doc: https://nim-lang.org/docs/xmltree.html
Hello,
When using the usage example, and replacing the query by
body p
, the list of paragraph are in the reverse order:@[<p>4</p>, <p>3</p>, <p>2</p>, <p>1</p>]
Thanks for your work !