OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Java String to Doc

[ Lists Home | Date Index | Thread Index ]

Create an org.xml.sax.helpers.InputSource, which most Java parsers can take as input:
 
     InputSource s = new InputSource(new StringReader(myString))); 
 
 
----- Original Message -----
Sent: Wednesday, October 16, 2002 10:33 AM
Subject: [xml-dev] Java String to Doc

I have a String in my application that is actually all xml.  I need to turn it into a doc in order to traverse it and send it to a method that someone else wrote. My problem: I have no idea how to go from String to Doc.  I don't see a constructor for Document that takes a String (of xml) as the parameter.  Is this possible?  What do I need to do?
 
TIA
 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS