aspose file tools*
The moose likes XML and Related Technologies and the fly likes SAX Dom parser 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 "SAX Dom parser" Watch "SAX Dom parser" New topic
Author

SAX Dom parser

Rajendra Sinha
Greenhorn

Joined: Jun 09, 2001
Posts: 1
Hi
i am a new user for xml parser.
can anybody please tell me where i can get the sample code for SAX DOM parser so that i can convert my java files field into a xml file.
if anybody before this write code in SAX DOM parser for generating xml file from java code please tell me .
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
You are actually mixing up two kinds of XML parser. The SAX style parser makes a pass through an XML file, calling your custom code whenever it finds a tag or other important information. The DOM style builds a Document Object Model (DOM) in memory. Frequently, a SAX parser is at the core of the code that creates a DOM, but the DOM user does not see that.
There are plenty of parsers with source code - look at the
xml.apache.org site for one.
These parsers convert XML into Java - not the other way around. A program to convert Java code into XML would not be an XML parser.
Bill

------------------
author of:
m pap
Greenhorn

Joined: Jun 13, 2001
Posts: 13
A program to convert Java code into XML would not be an XML parser....
Then what would it be called and how is it done. I want to be able to write Java that will become XML with different Schemas there is not a set one. My code should be able to be used for many types of schemas.
Thanks, mpap

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SAX Dom parser