blob: 0f1eaa00db6dc83fb50bfa82319aa6b84bc42046 [file] [log] [blame]
david_williamsecef30b2007-02-11 21:53:54 +00001
2String xml="<?xml version=\"1.0\" encoding=\"UTF-8\"?><message><sourceUri></sourceUri><body></body></message>";
3
4
5DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
6factory.setNamespaceAware(false);
7factory.setValidating(false);
8DocumentBuilder builder = factory.newDocumentBuilder();
9Document document = builder.parse(new InputSource(new StringReader(xml)));
10System.out.println(document);