This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes DOM document to Sax 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 "DOM document to Sax parser" Watch "DOM document to Sax parser" New topic
Author

DOM document to Sax parser

Ambika Jain
Ranch Hand

Joined: Jan 27, 2005
Posts: 48
Hello,

The client api provides us with a method that returns DOM document. The method processes the XML and the XML need not adhere to any schema.

In order to display the content of this document, I want to use SAX parser. Is there a way, I pass this document to SAX parser ?

Or, is there any other way to do this.

Thanks in advance,


Ambika Jain
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19719
    
  10

I assume you have written a ContentHandler that you would like to plug into a SAXParser? Then do this:If I am not mistaken this should call the methods in your ContentHandler.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DOM document to Sax parser
 
jQuery in Action, 3rd edition