XPathNavigator - Compiling XPath Queries
Hello,
My questions are in regards to the compilation of xpath queries using the compile() method in the XPathNavigator class.
1) If my application does not use caching is it worth compiling the xpath queries before executing them?
2) I've read that when executing xpath queries via XPathNavigator's select() method that the query is implicity compiled. Is this true? If so then why bother explicitly calling the compile() method?
3) I've also read that compiled queries come into use when the same query is called multiple times. How can I check that a query is compiled before calling the compile() method. That is, say I have a recursive function that compiles and executes a xpath query. Is there a way I can check if the query has already been compiled so I don't have to call the compile() method again?
Thanks for the replies!
|