XPath.compile(String _expression_) method allows you to compile an XPath _expression_ to an XPathExpression object, then you can do evaluation later. If your _expression_ will be used again and again, compile the _expression_ first should be faster.
Christine Li
XSLT Development
IBM Toronto Lab
Tel: (905)413-2601
Email: [EMAIL PROTECTED]
| "Weijian Fang"
<[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED] 03/14/2006 05:33 AM
|
|
Hi,
I am using Xalan's XPath Java API. I have some questions related to
its query performance.
1. Given a dom tree, are there some general methods to improve the
XPath query performance, such as indexing, etc.? It is very kind if
you can direct me to some links, docs, or Java classes.
2. In particular, my XPath query looks like
\*\*\*[local-name()='name'][contains(., 'abc')]. Are there any
optimization methods to improve the performance of this XPath query?
If I transform the above xpath to
\*\*\namespace:name[contains(., 'abc')],
it can be more efficient.
Are there any way to programmatically set up XPath query engine to
improve the performance?
Thanks a lot,
Weijian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
