Re: [xml] Xpath question
- From: Daniel Veillard <veillard redhat com>
- To: "Yong Chen (yongche)" <chen cisco com>
- Cc: xml gnome org
- Subject: Re: [xml] Xpath question
- Date: Tue, 3 Jun 2008 02:32:30 -0400
On Mon, Jun 02, 2008 at 06:20:07PM -0700, Yong Chen (yongche) wrote:
Got a question regarding xpath usage in libxml2.
If I have a document doc, which contains some nodes, say n1, n2, n3.
Now I have an xpath as: "/bookstore/book/title"
Do we have any api that can evaluate node "n1" and tell me that if we
were to apply this xpath string to the document, then n1 would be
selected (or not).
Basically I want to evaluate an xpath on node basis, not the full
The closest is the patter module, but that works only on a subset
you will have to look at the code in XPath/Schemas to get an idea on how
to use it, as there isn't much documentation.
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
] [Thread Prev