Java XML Parse String parseXml(String uri)

Here you can find the source of parseXml(String uri)

Description

parse Xml

License

Open Source License

Declaration

static public Document parseXml(String uri) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.*;
import javax.xml.parsers.*;

public class Main {
    static public Document parseXml(String uri) {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        try {/*w w w .  j  a v a2 s  . co  m*/
            DocumentBuilder builder = factory.newDocumentBuilder();
            return builder.parse(uri);

        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}

Related

  1. parseXml(Object obj)
  2. parseXML(String path)
  3. parseXML(String pathToMap)
  4. parseXML(String resp, String name)
  5. parseXML(String text)
  6. parseXml(String xml)
  7. parseXml(String xml)
  8. parseXml(String xml)
  9. parseXML(String xml)