Using DocumentBuilder
Apologies for asking this question.
First Question:
How do I use the Document Builder to open an XML document?
Document xmlMessage;
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
domFactory.setNamespaceAware(true);
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?
@OP: You come here quite a lot with questions about XML, several weeks apart. I'm not saying "don't do that" at all, because of course it is up to you. But I would urge you to invest in a good Java XML book, it will save you an enormous amount of pain and waiting around. I'd recommend [url=http://www.amazon.co.uk/Java-XML-Brett-D-McLaughlin/dp/059610149X/ref=pd_bbs_1/203-1708115-9526359?ie=UTF8&s=books&qid=1180017901&sr=8-1]this one[/url], but others may have better recommendations
Just a suggestion, don't take offence