Hi:

XPath API is slow because each time you invoke it it must compile the
expression (in fact must get a XPathContext). CachedXPathAPI can be used
along the time while the node to parse not change. So first time is slow
(the same as XPathAPI) but next calls this class not need to recompile the
expression.

Read CachedXPathAPI javadoc API.

You can see an samples looking in XPathAPI source code.

Bye.

J.

----- Original Message -----
From: "Siljan Simpson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 6:32 PM
Subject: usage of XPath


> Hi,
>
> I am working on a project using XML. Presently we are using CachedXPathAPI
to get a Node based on the XPath evaluation. From the documentation I
understand that this method is slow and compiling the XPath will be
efficient.
>
> Does anyone have a sample code on how the XPath can be compiled and used
to extract nodes ?
>
> Any pointers will be appreciated.
>
> Thanks,
> Siljan
> --
> __________________________________________________________
> Sign-up for your own FREE Personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
>
>

Reply via email to