org.ow2.jonas.lib.util
Class XMLSerializer

java.lang.Object
  extended by org.ow2.jonas.lib.util.XMLSerializer

public class XMLSerializer
extends Object

Serialize a given DOM Document. Handle namespaces nicely.

Author:
Guillaume Sauthier

Constructor Summary
XMLSerializer(Document doc)
          Creates a new XMLSerializer object.
 
Method Summary
 void serialize(OutputStream os)
          Serialize the encapsulated Document into the OutputStream
 void serialize(Writer writer)
          Serialize the encapsulated Document into the Writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSerializer

public XMLSerializer(Document doc)
Creates a new XMLSerializer object.

Parameters:
doc - Document to be serialized
Method Detail

serialize

public void serialize(OutputStream os)
               throws IOException
Serialize the encapsulated Document into the OutputStream

Parameters:
os - output stream
Throws:
IOException - When serialization fails

serialize

public void serialize(Writer writer)
               throws IOException
Serialize the encapsulated Document into the Writer

Parameters:
writer - writer
Throws:
IOException - When serialization fails


Copyright © 2010 OW2 Consortium. All Rights Reserved.