Skip to content

mortalisk/xtpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xtpath

Expression templates for C++11, giving an xpath like syntax for parsing xml or similar hierarchical documents. Xtpath can wrap any DOM-like library, and can add namespace support if needed. An adaptor class is provided for pugi-xml. You can easily create adaptor classes for other popular xml-parsers such as Xerces, or your own hierarchical document type and parser.

Example

To start, you first have to wrap a regular node in a Context-node:

auto doc = context(node);

You can then start querying the document from this context node. Say you want to find a node "bird", which has a child node "appearance" with an attribute "color" set to "black":

auto black_bird = doc | child("bird") | where(child("appearance") | attribute("color", "black"))

About

Xpath like expression templates for C++

Resources

License

BSL-1.0 and 2 other licenses found

Licenses found

BSL-1.0
LICENSE
BSL-1.0
LICENSE.txt
BSL-1.0
LICENSE_1_0.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published