{"repo":"antchfx/xpath","free":true,"listed":false,"github":"https://github.com/antchfx/xpath","clone":"git clone https://github.com/antchfx/xpath.git","description":"XPath package for golang, supports HTML, XML, JSON document query and more","language":"Go","stars":742,"topics":["xpath","golang","xml","html","xpath-patterns","xpath-query","selects-descendants","xpath2","go","go-xml"],"license":"MIT","category":"dev-tools","readme_excerpt":"XPath XPath is Go package provides selecting nodes from XML, HTML or other documents using XPath expression. Implementation - htmlquery - an XPath query package for HTML document - xmlquery - an XPath query package for XML document. - jsonquery - an XPath query package for JSON document Supported Features The basic XPath patterns. The basic XPath patterns cover 90% of the cases that most stylesheets will need. - node : Selects all child elements with nodeName of node. - : Selects all child elements. - @attr : Selects the attribute attr. - @ : Selects all attributes. - node() : Matches an org.w3c.dom.Node. - text() : Matches a org.w3c.dom.Text node. - comment() : Matches a comment. - . : Selects the current node. - .. : Selects the parent of current node. - / : Selects the document node. - a[expr] : Select only those nodes matching a which also satisfy the expression expr. - a[n] : Selects the nth matching node matching a When a filter's expression is a number, XPath selects based on position. - a/b : For each node matching a, add the nodes matching b to the result. - a//b : For each node matching a, add the descendant nodes matching b to the result. - //b : Returns elements in the entire document matching b. - a b : All nodes matching a or b, union operation(not boolean or). - (a, b, c) : Evaluates each of its operands and concatenates the resulting sequences, in order, into a single result sequence - (a/b) : Selects all matches nodes as grouping set. Node Axes - child:: : Th","default_branch":null,"files":null,"tree":[],"storefront":"/r/antchfx","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/antchfx/xpath/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}