• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAX Dom parser

 
Rajendra Sinha
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13049
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic