This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 12756
    
    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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: XML parsing procedure
 
Similar Threads
Reading value from FILEusing XSLT
Executing a stored procedure in Hibernate
executing XML in Eclipse
How to get a return value from the stored procedure using callable statement
problem in parsing an XML using SAX parser.