List of utility methods to do XML Document Create
Document | getDomElement(String aXml) Gets DOM structure Document doc = null; DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); try { DocumentBuilder db = dbf.newDocumentBuilder(); InputSource is = new InputSource(); is.setCharacterStream(new StringReader(aXml)); doc = db.parse(is); } catch (ParserConfigurationException e) { ... |
Document | LoadXml(String xml) Load Xml ByteArrayInputStream stream = new ByteArrayInputStream( xml.getBytes()); try { return LoadXml(stream); } finally { if (stream != null) stream.close(); |