[xsd-users] how to achieve XPath support

Boris Kolpackov boris at codesynthesis.com
Thu Apr 1 09:43:22 EDT 2010


Hi Toby,

Toby Ealden <toby.ealden at gmail.com> writes:

> I can't seem to find any clear information about whether/how XPath is
> supported. [...]
>
> What I'm trying to do is locate a node in the tree using xpath and cast up
> to the C++ class, change a value and then write the data back. I'm clear on
> how to do all of this except for the first bit - locate a node in the tree
> using xpath.
> 
> Is this possible and if so can anybody give me step by step instructions of
> how to achieve it, for example - 'install xqilla, configure this, link with
> library xyz.lib etc'.

Yes, this is possible. The step-by-step instructions would be compiler
and platform-specific (both which you failed to mention, BTW). But 
generally, you need to download, build, and install the XQilla library 
in addition to Xerces-C++ and then link both to your application.

There is also the 'xpath' example in the examples/cxx/tree/ directory
of the XSD distribution which shows how to use XPath with C++/Tree.
It includes the README file which describes the example in detail
as well as the makefiles and project/solution files. So you may want 
to get this example working first and then base your own code on it.

Boris



More information about the xsd-users mailing list