James-LG / Skyscraper

Rust library for scraping HTML using XPath expressions
MIT License
31 stars 4 forks source link

xpath: wildcard is returning a single node rather than a vector #16

Closed kesmit13 closed 1 year ago

kesmit13 commented 1 year ago

I have the following XML document that I'm using for a test case:

<root>
    <a>hi</a>
    <b>bye</b>
</root>

I want to get all of the child elements of <root> using //root/*. This is returning a single DocumentNode. I was expecting a vector of DocumentNodes like I would get if all of the child elements were <a> and the xpath was //root/a.