dcsimg

How do I read XML data from String variable in Java?

Peter Gelderbloem

Most parsers takes an InputStream/Reader so the best way is to construct a StringReader passing the constructor the string containing the XML. You can then pass this StringReader to the parser.