File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
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: 13028
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 agree. Here's the link:
subject: XML parsing procedure
It's not a secret anymore!