Hi all,
What is the difference between the DOM document instances created using
1) Xerces
InputStream is = new FileInputStream("resources/test.xml");DOMLoader
loader = new XercesLoader();
Document doc1 = loader.load(is);
2) Axiom
OMElement documentElement = new
StAXOMBuilder("resources/test.xml").getDocumentElement();OMFactory
doomFactory = DOOMAbstractFactory.getOMFactory(); StAXOMBuilder
doomBuilder = new
StAXOMBuilder(doomFactory,documentElement.getXMLStreamReader());
Document doc2 = (org.w3c.dom.Document) doomBuilder.getDocument();
3) Javax
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();DocumentBuilder builder =
factory.newDocumentBuilder();
Document doc3 = builder.parse(new File("resources/test.xml"));
I wanted to pass these DOM instances to an XPath processor (Psychopath).
But it worked only when the DOM instance created using xerces are passed. I
want doc2 instance to be passed successfully.
I would appreciate a lot if somebody can point me out what's I'm doing
wrong here.