File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes xml from DOM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml from DOM" Watch "xml from DOM" New topic
Author

xml from DOM

Bala Krishna
Ranch Hand

Joined: Jan 26, 2001
Posts: 95
I read my xml document from a file, make some changes to it (like adding an attribute here, adding an element there etc.) using DOM. When I'm done with the changes, I want to get the changed xml from DOM. I looked at org.w3c.dom.* packages, but couldn't find a way to do it. Had to take google's help, and I've seen many people asking the same question (how do I get xml from DOM) in various forums. Finally, I stumbled upon the following code :



I tried it and it works. But, some how, I feel that it shouldn't be this complicated (albeit only a few lines of code), to get xml from DOM. Has any one else found a different/better solution to this problem?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xml from DOM
 
Similar Threads
JSP error page
How to access byte array web method
BufferedImage to byte[]
XSL transformation using Apache Xalan
Write a String to ByteArrayOutputStream