org.ow2.util.xml
Class XMLSerializer

java.lang.Object
  extended by org.ow2.util.xml.XMLSerializer

public class XMLSerializer
extends Object

Serialize a given DOM Node. Handle namespaces nicely. Adapted from JOnAS' own org.ow2.jonas.lib.util.XMLSerializer

Author:
Guillaume Sauthier

Constructor Summary
XMLSerializer(Node node)
          Creates a new XMLSerializer object.
 
Method Summary
 void serialize(OutputStream os)
          Serialize the encapsulated Node into the OutputStream.
 void serialize(Writer writer)
          Serialize the encapsulated Node 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(Node node)
Creates a new XMLSerializer object.

Parameters:
node - Node to be serialized
Method Detail

serialize

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

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

serialize

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

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


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.