I intend using XPATH to browsw thru an XML document in Java.
This XML document is of type Document.
First Question:
How do I use the Document Builder to open an XML document?
This XML document is of type Document.
First Question:
How do I use the Document Builder to open an XML document?
Code:
Document xmlMessage;
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true); // never forget this!
DocumentBuilder builder = domFactory.newDocumentBuilder();
Document doc = builder.parse("books.xml"); //???
I need to pass xmlMessage to the parse method() ?
how can I pass document xmlMessage?
Comment