Thanks for the response.

CachedXPathAPI generates the classes needed for XPathContext (DTMManager and 
DTMs). But if I use the same XPath repeatedly, the XPath is compiled everytime 
and not cached.

Is there someway I can reuse the compiled-XPath ?

-Siljan


----- Original Message -----
From: Joaquín_Sánchez_Jiménez <[EMAIL PROTECTED]>
Date: Thu, 26 Jun 2003 19:06:39 +0200
To: "Siljan Simpson" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Subject: Re: usage of XPath

> 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
> >
> >
> 

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Reply via email to