This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML parsing procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML parsing procedure" Watch "XML parsing procedure" New topic

XML parsing procedure

avaya c

Joined: Oct 22, 2000
Posts: 3
I am using xml4j_3_0_1 parser. I have gone through the samples of
DOMCOunt,DOMWriter etc using
c>> java dom.DOMWriter data\personal.xml
But what is the procedure if i have my own abcd.xml,abcd.dtd and
a small program which calls the parser and gives me the dom tree reference.
Please help...fighting with this since three days.
- Thanks in advance.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13000
I have been using the Sun JAXP parser so I don't know about the XML4J parser, but it should have come with at least one example of a program to create a parser and read in an XML file.
It can really be rather simple.
input = Resolver.createInputSource( df );
try {
doc = XmlDocument.createXmlDocument (input, false);
}catch( SAXException se ){
System.out.println("createXmlDocument threw " + se );
But the exact classes depend on the parser package.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: XML parsing procedure
It's not a secret anymore!