Hi, I'm using JXPath for just one week to query flat XML files. While I do my unit tests, the soft is working well but as soon as it is included in the final environment based on Tomcat and servlet, it doesn't work. Searching where comes from this problem, I added logs and here is what I have found : To get the XML nodes matching a XPath query, I have written : JXPathContext ctx = JXPathContext.newContext(document); String query = "<some XPath query"; Pointer ptr = ctx.getPointer(query); return ptr.getNode().toString();
In standalone, the ptr.getNode() is a org.apache.crimson.tree.ElementNode and I get the whole XML tags as a string. Using Tomcat, the ptr.getNode() is a org.apache.xerces.dom.DeferredElementImpl and I get "null". My first solution is to write a method to parse the NodeImpl and to create the XML as a string. Does exist a better solution ? Thanks for your help. Franck --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
