converting xml string in to a file object
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   gbsv_prasad
Posted On:   Monday, September 17, 2001 12:25 PM

Hi
I have XML in the form of String .. i just want to convert this string in to a file to parse.. how can i do that ..



Here is my xml string



String str = " <?xml version="1.0"?>





some name
age


";


if u have code that would be great
Thanks in advance

Re: converting xml string in to a file object

Posted By:   Arun_Bharathan  
Posted On:   Monday, September 17, 2001 12:37 PM

You don't have to convert it into a file to parse. You only have convert it into a Input stream. You could something like this....

private DOMParser parser;
parser.parse(new InputSource(new StringReader(inString)));
Document xmlDocument = parser.getDocument();
About | Sitemap | Contact