On 10/8/2010 10:01 AM, Ramon F Herrera wrote:

Newbie alert...

After a LOT of searching around (programming languages, libraries,
toolkits, etc.) I have concluded that XPath is the best approach for my
application. I found an implementation and my app is running fine. The
only problem is that the app is rather slow, and I foresee the need for
speed.

See my imports below. The reason for the sluggish performance is that my
XPath is based on DOM, and for every element retrieved the whole tree
must be re-evaluated. Needless to say, that is very inefficient.

Is there any XPath implementation based on SAX out there? Frankly, I
don't even know where to start. Pointers would be very much appreciated.

TIA,

-Ramon

ps: I only do retrieves, my XML files are large and read-only.

------------------------------

import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

I am also interested in having XPath/DOM:

(1) Read the whole XML tree, and keep in memory. (initialization stage)
(2) Search the tree, as needed.

(In fact, this sounds even better than SAX, if there is such thing ;-)

-RFH



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-users-h...@xerces.apache.org

Reply via email to