go-xmlpath / xmlpath

Strict subset of the XPath specification for the Go language.
http://gopkg.in/xmlpath.v2
Other
115 stars 37 forks source link

Support multiple attribute conditions #24

Open dahankzter opened 8 years ago

dahankzter commented 8 years ago

It would be super nice to be able to use logical operators in the path expression

Example:

<test attr1="a" attr2="b">
     <a>aaaa</a>
     <b>bbb</b>
</test>

Xpath:

/test[@attr1='a' and @attr2='b']/a

This results in a panic currently.