Skip to content

Instantly share code, notes, and snippets.

Created April 12, 2012 11:37
java.lang.Srting s = "<hello>Hello DOM Parser</hello>";
java.io.InputStream sbis = new java.io.StringBufferInputStream(s);
javax.xml.parsers.DocumentBuilderFactory b = javax.xml.parsers.DocumentBuilderFactory.newInstance();
b.setNamespaceAware(false);
org.w3c.dom.Document doc = null;
javax.xml.parsers.DocumentBuilder db = null;
db = b.newDocumentBuilder();
doc = db.parse(sbis);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment