XPATH evaluation with libxml

Discussion in 'XML' started by Bart, Jun 14, 2005.

  1. Bart

    Bart Guest

    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
    Bart, Jun 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Gregory
    Replies:
    1
    Views:
    505
  2. Olav
    Replies:
    3
    Views:
    4,240
  3. Ilias Lazaridis
    Replies:
    2
    Views:
    391
    Ilias Lazaridis
    Apr 24, 2005
  4. Ilias Lazaridis
    Replies:
    74
    Views:
    756
    Ilias Lazaridis
    Apr 4, 2005
  5. Ilias Lazaridis
    Replies:
    18
    Views:
    333
    Bill Guindon
    Apr 9, 2005
Loading...

Share This Page