Answers for "have to parse xml in java"

0

java parse xml string

public static Document loadXMLFromString(String xml) throws Exception
{
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    InputSource is = new InputSource(new StringReader(xml));
    return builder.parse(is);
}
Posted by: Guest on June-17-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language