
XPath package for golang, supports HTML, XML, JSON document query and more
XPathGo is a powerful package designed for the Go programming language, enabling users to adeptly select nodes from various document types, including XML, HTML, and JSON. This flexibility allows developers to work with structured data efficiently, leveraging their existing knowledge of XPath expressions. Whether you're processing HTML for web scraping or querying XML files for data extraction, XPathGo has your needs covered with its robust functionality and ease of use.
The package provides a comprehensive range of features that cater to different querying needs, emphasizing simplicity without sacrificing power. By supporting core XPath patterns and expressions, XPathGo allows you to perform precise queries, making it a perfect choice for developers who need an effective way to navigate and manipulate complex documents.
Comprehensive Node Selection: Use basic XPath patterns to select nodes effortlessly, covering 90% of typical use cases for stylesheets.
Child and Parent Navigation: Easily select child nodes with node, and navigate back to parent nodes using .., making traversal simple.
Attribute Access: Retrieve specific attributes with @attr or all attributes with @*, streamlining the extraction of important data.
Flexible Expressions: Utilize a range of expression types including number, boolean, and string, allowing for complex querying capabilities.
Node Axis Support: Take advantage of node axes such as child::, descendant::, and ancestor:: for granular document navigation.
Logical Combinations: Combine selections using union operations with | or concatenate results efficiently with (a, b, c).
Arithmetic Operations: Perform math operations directly within your XPath expressions, enabling enhanced data manipulation without leaving the query context.
Simplicity Meets Power: Despite its advanced features, XPathGo remains user-friendly, making it accessible to both novice and experienced developers.
