xml.dom
Class XmlTransformer

java.lang.Object
  extended by xml.dom.XmlTransformer

public class XmlTransformer
extends java.lang.Object

This object uses XSLT to write out a DOM document to an OutputStream. This program uses the DOM Level 2 api and JAXP 1.2.


Method Summary
static void transform(org.w3c.dom.Document document, java.io.File stylesheet, java.io.OutputStream out)
          Transforms a DOM Document into another form, s pecified by its stylesheet.
static void writeXml(org.w3c.dom.Document document, java.io.OutputStream out)
          Writes a DOM Document to an OutputStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeXml

public static void writeXml(org.w3c.dom.Document document,
                            java.io.OutputStream out)
                     throws java.lang.Exception
Writes a DOM Document to an OutputStream

Parameters:
document - the top level node of the DOM tree
out - OutputStream to write the output to
Throws:
java.lang.Exception

transform

public static void transform(org.w3c.dom.Document document,
                             java.io.File stylesheet,
                             java.io.OutputStream out)
Transforms a DOM Document into another form, s pecified by its stylesheet.

Parameters:
document - the top level node of the DOM tree
stylesheet - the stylesheet containing the transform defs
out - OutputStream to write the output to