From tauXSchema

XToDoInternal: 000036-Notes

Using a Transformer in ConvetionalParser:

			TransformerFactory tf = TransformerFactory.newInstance();
		    Transformer transformer = tf.newTransformer();

		    transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
		    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
		    transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2" );

		    DOMSource source = new DOMSource(doc);          
		    StreamResult result = new StreamResult(new FileOutputStream(path));  
		    transformer.transform(source, result);
Retrieved from http://cgi.cs.arizona.edu/apps/tauXSchema/index.php?n=XToDoInternal.000036-Notes
Page last modified on October 29, 2008, at 11:07 AM