org.planx.xmlstore.convert
Class XMLOutputter

java.lang.Object
  extended by org.planx.xmlstore.convert.XMLOutputter

public class XMLOutputter
extends Object

Author:
Henning Niss

Constructor Summary
XMLOutputter()
          Construct an XML Outputter that with the default indent step.
XMLOutputter(int indent)
          Construct an XML Outputter that with the specified indent step.
 
Method Summary
 void output(Node node, OutputStream os)
          Output a node as an XML document.
 void output(Node node, Writer out)
          Output a node as an XML document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLOutputter

public XMLOutputter()
Construct an XML Outputter that with the default indent step. The default indent step is currently 2.


XMLOutputter

public XMLOutputter(int indent)
Construct an XML Outputter that with the specified indent step.

Parameters:
indent - the number of spaces to use as indentation.
Method Detail

output

public void output(Node node,
                   Writer out)
            throws XMLException
Output a node as an XML document. This method outputs a node as if it was the root node of a document to the specified Writer.

Parameters:
node - node to be output
out - writer to output to
Throws:
XMLException - if an error occurs during writing.

output

public void output(Node node,
                   OutputStream os)
            throws XMLException
Output a node as an XML document. This method outputs a node as if it was the root node of a document to the specified OutputStream.

Parameters:
node - node to be output
os - output stream to output to
Throws:
XMLException - if an error occurs during writing.


Copyright © 2010. All Rights Reserved.