Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XPATH evaluation with libxml

Reply
Thread Tools

XPATH evaluation with libxml

 
 
Bart
Guest
Posts: n/a
 
      06-14-2005
Hello,

I am real new to using LIBXML and have a question about XPATH
evaluations. The question may show a real ignorance of the LIBXML
structure, don't so assume I know what I am talking about.

I am trying to use the XPATH functions to pull the data for individual
data elements. The order of the elements whose value I must find are
not necessarily contiguous in the XML document. So walking the tree
will not work.

I have figured out how to make the call to xmlXPathEvalExpression
function with a full XPATH starting at the root of the document. But
the documents I am working with are so large that this can be too slow
for my purpose.

I can identify a specific node of the whole document that I know that
several values I need to find are contained within. Can I use the
xmlXPathEvalExpression to find the branch I need to work with, then by
manipulating the context or the XPATH object of the
xmlXPathEvalExpression call to then do further calls to
xmlXPathEvalExpression to find specific elements in the now segregated
branch? I am thinking that I would be working with a much smaller tree
and the XPATH evaluations would work much faster.

Is this doable?

Thanks

Bart Torbert
http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[libxml]: Can't find nodes using XPath, namespaces mess Stanislaw Wozniak Ruby 7 08-03-2009 04:20 AM
Xpath and axis navigation using libxml Alfie Noakes XML 4 11-11-2008 02:11 PM
Dealing with xpath using libxml Vaucher Bastien Ruby 0 02-21-2007 09:32 AM
C++ libraries: Xerces, libxml/libxml++ or perhaps Arabica? Olav XML 3 01-20-2005 02:51 PM
Problems with libxml, XML::LibXML and Perl Ian Gregory XML 1 07-25-2003 04:20 PM



Advertisments