Exemple #1
0
 public String Xml_outer() {
   Transformer transformer = transformer_();
   StringWriter writer = new StringWriter();
   try {
     transformer.transform(new DOMSource(xnde), new StreamResult(writer));
   } catch (TransformerException e) {
     throw Err_.err_key_(e, XmlDoc_.Err_XmlException, "failed to get xml string");
   }
   return writer.toString();
 }
Exemple #2
0
 static Transformer transformer_() {
   TransformerFactory transformerfactory = TransformerFactory.newInstance();
   Transformer transformer = null;
   try {
     transformer = transformerfactory.newTransformer();
   } catch (TransformerConfigurationException e) {
     throw Err_.err_key_(e, XmlDoc_.Err_XmlException, "failed to get create transformer");
   }
   transformer.setOutputProperty("omit-xml-declaration", "yes");
   return transformer;
 }