wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes DOM object from 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 object from StringBuffer" Watch "DOM object from StringBuffer" New topic
Author

DOM object from StringBuffer

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
I have an XML in StringBuffer, say

StringBuffer sb = new StringBuffer()
sb.append("<tag1><tag2>33</tag2><tag2>33</tag2></tag1>");

Is it possible to create a DOM object from this StringBuffer so that I can iterate over the XML using the DOM object.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Yes. One way to do it could be :


[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 object from StringBuffer
 
Similar Threads
Fundamental Question of XML
Query relating to transforming XML using XSL
Question on JSP Tags
passing xml on wire
How to read XML data