Showing posts with label string to doc. Show all posts
Showing posts with label string to doc. Show all posts

Tuesday, March 27, 2012

Convert String To XML Document

public Document ConvertStringToDocument(String xmlString) {
        Document xmlDocument = null;
        try {
            DocumentBuilderFactory docfactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = docfactory.newDocumentBuilder();
            InputSource iSource = new InputSource(new StringReader(xmlString));
            xmlDocument = builder.parse(iSource);
        } catch (Exception ex) {
           
        }
        return xmlDocument;
    }

Featured Posts

Kali Linux Remote Desktop: Access GNOME from Windows Using Native RDP

  Kali Linux + GNOME 50 + GNOME Remote Desktop + Windows Remote Desktop (MSTSC) Getting a full GNOME desktop remotely on Kali Linux can be ...