aspose file tools*
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
Author

XML parsing procedure

avaya c
Greenhorn

Joined: Oct 22, 2000
Posts: 3
Hi,
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 GetParseTree.java 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
Rancher

Joined: Mar 22, 2000
Posts: 12789
    
    5
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.
Bill
 
jQuery in Action, 2nd edition
 
subject: XML parsing procedure