dcsimg
How to build a DOM Document from a string ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mark_Staheli
Posted On:   Tuesday, November 27, 2001 08:38 AM

Hi there,


I just would like to take a string in xml format
and process it (using DOM and Xerces).
Sure I could save the string to a file and afterwards
process the file - but there should be an
easier way, is there ?


Thanks


Mark

Re: How to build a DOM Document from a string ?

Posted By:   soumya_j  
Posted On:   Tuesday, November 27, 2001 10:52 PM

U can build a document from string XML like this

DOMParser objDOMParser=new DOMParser();

/* Parse the XML */
objDOMParser.parse(new InputSource(
new StringReader(strResponseXML)));

/* Get the Document from the DOMParser */
objDOMParser.getDocument();
About | Sitemap | Contact