(String xmlString)
| 42 | } |
| 43 | |
| 44 | static XmlNode create(String xmlString) { |
| 45 | try (InputStream stream = new ByteArrayInputStream(xmlString.getBytes(UTF_8))) { |
| 46 | DocumentBuilderFactory dbf = XmlUtil.getNsAwareDocumentBuilderFactory(); |
| 47 | Document doc = dbf.newDocumentBuilder().parse(stream); |
| 48 | return new XmlNode(doc.getDocumentElement()); |
| 49 | } catch (Exception e) { |
| 50 | throw new RuntimeException(e); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | Node getNode() { |
| 55 | return node; |