org.apache.archiva.xml
Class XMLWriter

java.lang.Object
  extended by org.apache.archiva.xml.XMLWriter

public class XMLWriter
extends Object

XMLWriter - Making writing XML files easier.


Constructor Summary
XMLWriter()
           
 
Method Summary
static void write(org.dom4j.Document doc, Writer writer)
          Write the Document to the provided Writer, leaving the Writer open.
static void write(org.dom4j.Document doc, Writer writer, boolean close)
          Write the Document to the provided Writer, with an option to close the writer upon completion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLWriter

public XMLWriter()
Method Detail

write

public static void write(org.dom4j.Document doc,
                         Writer writer)
                  throws XMLException
Write the Document to the provided Writer, leaving the Writer open.

Parameters:
doc - the document to write.
writer - the writer to write to.
Throws:
XMLException - if there was a problem writing the xml to the writer.

write

public static void write(org.dom4j.Document doc,
                         Writer writer,
                         boolean close)
                  throws XMLException
Write the Document to the provided Writer, with an option to close the writer upon completion.

Parameters:
doc - the document to write.
writer - the writer to write to.
close - true to close the writer on completion.
Throws:
XMLException - if there was a problem writing the xml to the writer.


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.