On 9/11/2012 2:20 PM, Ramon F Herrera wrote:
> If the path contains any character like "[", "@", "=", etc. I must
> resort to XQilla, which is wonderful (a LOT easier to code than pure
> Xerces), but as slow as molasses in cold weather
You might want to look at Xalan. There was a fair amount of work put
into Xalan performance; I don't know how XQilla compares to that.
Or, if you're using IBM's Java environment, you might want to look at
the XML support that ships with that JRE, which is another design
iteration past Xalan. Or, in Websphere, the Websphere XML feature, which
supports XPath 2.0, XSLT 2.0, and XQuery and is yet another design
iteration.
With all of these, remember that the JAXP/TRAX APIs allow precompiling a
path or query. And remember that the performance can be improved if the
document is cached in memory in the appropriate internal representation.
(The Xerces implementation is single-pass, I believe; if you want to run
more than one path the advantage goes away quickly because you have to
reparse the input document.)