Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Beginning Java and the fly likes DOM output to StringBuffer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "DOM output to StringBuffer" Watch "DOM output to StringBuffer" New topic
Author

DOM output to StringBuffer

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
I am using following to write the contents of DOM object to console.



Is there a way to write the contents of DOM object to StringBuffer instead of console
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Hint : look at the various constructors for StreamOutput, and look at the StringWriter class.


[My Blog]
All roads lead to JavaRanch
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
Thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DOM output to StringBuffer