You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Cory Isaacson <ci...@capita2.com> on 2000/08/18 21:10:12 UTC

XPathAPI

I used the XPathAPI to find a node in a document (always a single node). It works fine and is very simple to use, but I noticed a note that said for better performance the lower-level API is faster. If I am doing a lookup on the same basic Xpath string each time, but with a different variable, such as:

xpath = "/ROOT/ELEM1/ELEM2/[@ATTR1='" + var1 + "'" + " and @ATTR2='" + var2 + "']";

Is there a faster way to do this? I need to call this repeatedly, but the var1 and var2 values are different each time. 

Thanks,

Cory