Alternatively, you may want to look at the CachedXPathAPI class. This keeps a copy of the document in memory in Xalan's native format, so you only pay the model-construction cost once for multiple XPath evaluations. If you _alter_ the document the cached copy becomes invalid, so this isn't good for search-and-alter-and-search-again kinds of tasks... but if you're just retrieving data, it works well. (This is the approach Xalan's stylesheet processing uses, for example.)
______________________________________ "... Three things see no end: A loop with exit code done wrong, A semaphore untested, And the change that comes along. ..." -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff.org/pegasus/songs/threes-rev-11.html)