com.epam.fixml.converter
Class XMLSerializer

java.lang.Object
  extended by com.epam.fixml.converter.XMLSerializer

public class XMLSerializer
extends Object

Implements an XML serializer supporting SAX pretty serializing. Serializing is done by firing SAX events and using the serializer as a content handler.

If an I/O exception occurs while serializing, the serializer will not throw an exception directly, but only throw it at the end of serializing ContentHandler.endDocument().


Constructor Summary
XMLSerializer(OutputStream byteStream)
           
XMLSerializer(OutputStream byteStream, String encoding)
           
XMLSerializer(Result result)
           
XMLSerializer(Result result, String encoding)
           
XMLSerializer(Writer writer)
           
XMLSerializer(Writer writer, String encoding)
           
 
Method Summary
 ContentHandler asContentHandler()
           
 void setIndent(boolean indent)
           
 void setIndentAmount(int indentAmount)
           
 void setOmitXMLDeclaration(boolean omitXMLDeclaration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLSerializer

public XMLSerializer(OutputStream byteStream)

XMLSerializer

public XMLSerializer(OutputStream byteStream,
                     String encoding)

XMLSerializer

public XMLSerializer(Writer writer)

XMLSerializer

public XMLSerializer(Writer writer,
                     String encoding)

XMLSerializer

public XMLSerializer(Result result)

XMLSerializer

public XMLSerializer(Result result,
                     String encoding)
Method Detail

setOmitXMLDeclaration

public void setOmitXMLDeclaration(boolean omitXMLDeclaration)
Parameters:
omitXMLDeclaration - specifies whether the serializer should output an XML declaration

setIndent

public void setIndent(boolean indent)
Parameters:
indent - specifies whether the serializer add additional indentation whitespaces when outputting the result tree

setIndentAmount

public void setIndentAmount(int indentAmount)
Parameters:
indentAmount - specifies number of whitespace characters of single indent step

asContentHandler

public ContentHandler asContentHandler()
                                throws com.epam.fixml.converter.FIXMLConverterException
Throws:
com.epam.fixml.converter.FIXMLConverterException


Copyright © 2000-2012 EPAM Systems. All Rights Reserved.