org.compass.core.xml.javax.converter.support
Class Dom2StaxSerializer

java.lang.Object
  extended by org.compass.core.xml.javax.converter.support.Dom2StaxSerializer

public class Dom2StaxSerializer
extends Object

Outputs a DOM document using a XMLStreamWriter provided.


Field Summary
protected  boolean mRepairing
           
protected  javax.xml.stream.XMLStreamWriter mWriter
           
 
Constructor Summary
Dom2StaxSerializer(javax.xml.stream.XMLStreamWriter sw)
           
 
Method Summary
protected  String buildDTD(DocumentType doctype)
           
protected  void doClose()
           
protected  void doOutputElement(Element elem, org.compass.core.xml.javax.converter.support.Dom2StaxSerializer.NsStack nsStack)
           
protected  void doOutputNode(Node node, org.compass.core.xml.javax.converter.support.Dom2StaxSerializer.NsStack nsStack)
           
static void main(String[] args)
           
 void output(Document doc)
           
 void outputFragment(Node node)
           
 void outputFragment(NodeList nodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mWriter

protected final javax.xml.stream.XMLStreamWriter mWriter

mRepairing

protected final boolean mRepairing
Constructor Detail

Dom2StaxSerializer

public Dom2StaxSerializer(javax.xml.stream.XMLStreamWriter sw)
Method Detail

output

public void output(Document doc)
            throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

outputFragment

public void outputFragment(NodeList nodes)
                    throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

outputFragment

public void outputFragment(Node node)
                    throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

doOutputElement

protected void doOutputElement(Element elem,
                               org.compass.core.xml.javax.converter.support.Dom2StaxSerializer.NsStack nsStack)
                        throws javax.xml.stream.XMLStreamException
Parameters:
elem - Element to output
Throws:
javax.xml.stream.XMLStreamException

doOutputNode

protected void doOutputNode(Node node,
                            org.compass.core.xml.javax.converter.support.Dom2StaxSerializer.NsStack nsStack)
                     throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

doClose

protected void doClose()
                throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

buildDTD

protected String buildDTD(DocumentType doctype)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright (c) 2004-2009 The Compass Project.