@Test public void testXmlToString() throws Exception { System.out.println("xmlToString"); Document document = null; String expResult = ""; String result = XmlUtil.xmlToString(document); }
public static String xmlToString(Document document) throws Exception { if (transformer == null) { throw new Exception("Transformer is null"); } Source xmlSource = new DOMSource(document); StringWriter stringWriter = new StringWriter(); Result result = new StreamResult(stringWriter); transformer.transform(xmlSource, result); return stringWriter.toString(); }
XmlUtil { public static String xmlToString(Document document) throws Exception { if (transformer == null) { throw new Exception("Transformer is null"); } Source xmlSource = new DOMSource(document); StringWriter stringWriter = new StringWriter(); Result result = new StreamResult(stringWriter); transformer.transform(xmlSource, result); return stringWriter.toString(); } }
XmlUtil { public static String xmlToString(Document document) throws Exception { if (transformer == null) { throw new Exception("Transformer is null"); } Source xmlSource = new DOMSource(document); StringWriter stringWriter = new StringWriter(); Result result = new StreamResult(stringWriter); transformer.transform(xmlSource, result); return stringWriter.toString(); }  }
XmlUtil { public static String xmlToString(Document document) throws Exception { if (transformer == null) { throw new Exception("Transformer is null"); } Source xmlSource = new DOMSource(document); StringWriter stringWriter = new StringWriter(); Result result = new StreamResult(stringWriter); transformer.transform(xmlSource, result); return stringWriter.toString(); }  static Document stringToXml(String string); static String xmlToString(Document document); }
XmlUtil { public static String xmlToString(Document document) throws Exception { if (transformer == null) { throw new Exception("Transformer is null"); } Source xmlSource = new DOMSource(document); StringWriter stringWriter = new StringWriter(); Result result = new StreamResult(stringWriter); transformer.transform(xmlSource, result); return stringWriter.toString(); }  static Document stringToXml(String string); static String xmlToString(Document document);  }