/** * Pretty-print a Document to OutputStream. */ public final static void print(Document document, OutputStream out) throws IOException { print(document, new OutputStreamWriter(out)); }
/** * Pretty-print a Document to File. */ public final static void print(Document document, File file) throws IOException { print(document, new FileWriter(file)); }
/** * Pretty-print a Document to File. */ public final static void print(Document document, File file) throws IOException { print(document, new FileWriter(file)); }
/** * Pretty-print a Document to OutputStream. */ public final static void print(Document document, OutputStream out) throws IOException { print(document, new OutputStreamWriter(out)); }
/** * Pretty-print a Document back to String of XML. */ public final static String print(Document document) throws IOException { StringWriter result = new StringWriter(); print(document, result); return result.toString(); }
/** * Pretty-print a Document back to String of XML. */ public final static String print(Document document) throws IOException { StringWriter result = new StringWriter(); print(document, result); return result.toString(); }
/** * Save properties to XML output. */ public void save(OutputStream out) throws ParserConfigurationException, IOException { XMLUtils.print(saveToDocument(), out); }
/** * Save properties to XML output. */ public void save(Writer out) throws ParserConfigurationException, IOException { XMLUtils.print(saveToDocument(), out); }
/** * Serialize (print) XML document to byte array (as String). */ private String writeXML(Document doc) { try { return XMLUtils.print(doc); } catch(IOException e) { throw new PropertyImplementationException("Cannot serialize XML", e); } }
/** * Convenience method - Use ElectricXML to access the HTML in the response for easy access. */ protected Document getDocument( WebResponse rs ) throws IOException, SAXException, ParseException { return new Document( new StringReader( XMLUtils.print( rs.getDOM() ) ) ); }
valueNode = doc.createCDATASection(XMLUtils.print((Document) value)); } catch (IOException ioe) { return; // cannot serialize XML - carry on with rest of properties.
value = XMLUtils.print((Document) valueEntry.getValue());