473,385 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XPATH evaluation with libxml

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
ba**********@ihsenergy.com

Jul 20 '05 #1
0 1252

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ian Gregory | last post by:
Hi, One of our servers has recently been upgraded and as a result both libxml and XML::LibXML have been upgraded. The OS is OpenBSD 3.3. libxml has gone from version 2.4.18 to 2.5.7p1 and...
4
by: Vincent Lefevre | last post by:
Hello, The XPath 1.0 recommendation says: A number represents a floating-point number. A number can have any double-precision 64-bit format IEEE 754 value . These include a special...
4
by: Bnaya Eshet | last post by:
I do like XPath, I really do. But I'm working on the compact framework which XPath is not included. So I come to understanding that if XPath do not come to the mountain,
2
by: Locusta | last post by:
Hello, I would like to use XPATH in a C program to retrieve values from XML documents. Did anyone tried this and can give me some advice? Cheers, Locusta
8
by: cerelaz | last post by:
Hi, I need to do some Xpath queries. How to add (or multiply) a values returned by a const? why this //book/price/text()*10 doesn't work? what's wrong? thanks ps I need to use a great c++...
1
by: CptDondo | last post by:
I am working on an embedded platform. I have php4 installed along with libxml, so I have working DOMXML and xpath stuff... But I can't figure out how to use it. I am trying to get the base...
1
by: Arndt Jonasson | last post by:
The way I read the XPath 1.0 specification, queries like "//*/ text()/.." and "//*/child::text()" should be valid. xmllint seems to agree with me, but xsltproc gives syntax errors for those...
2
by: Weston | last post by:
Poking around with XPath using SimpleXML, it looks like there are at least a few reasonably common XPath operators and predicates that aren't supported. I'd like to check my observations against...
4
by: Alfie Noakes | last post by:
Using this Xpath expression, //table/row I have a nodeset result from a Xpath query which returns all the <row> elements for the given table in the following simeple XML structure..... ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.