wood burning stoves 2.0*
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
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: 14687
    
  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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: DOM output to StringBuffer