This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 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
 
jQuery in Action, 2nd edition
 
subject: DOM output to StringBuffer
 
Similar Threads
Creating a new file using PrintWriter.
printwriter vs system.out.println
StringBuffer??
sevlets and javascript
String and StringBuffer