org.apache.ws.jaxme.util
Class DOMSerializer

java.lang.Object
  extended by org.apache.ws.jaxme.util.DOMSerializer

public class DOMSerializer
extends java.lang.Object

Serializes a DOM node into a stream of SAX events.

Version:
$Id$
Author:
Jochen Wiedmann

Constructor Summary
DOMSerializer()
           
 
Method Summary
protected  void doSerialize(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
           
protected  void doSerializeChilds(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
           
protected  void endPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
           
 boolean isNamespaceDeclarationAttribute()
          Returns whether XML declarations are being serialized as attributes or as SAX events (default).
 boolean isParentsNamespaceDeclarationDisabled()
          Sets whether XML declarations present in the parent nodes are being serialized (default) or not.
protected  void parentsEndPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
           
protected  void parentsStartPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
           
 void serialize(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
          Converts the given node pNode into a stream of SAX events, which are fired into the content handler pHandler.
 void setNamespaceDeclarationAttribute(boolean pXmlDeclarationAttribute)
          Sets whether XML declarations are being serialized as attributes or as SAX events (default).
 void setParentsNamespaceDeclarationDisabled(boolean pParentsXmlDeclarationDisabled)
          Returns whether XML declarations present in the parent nodes are being serialized (default) or not.
protected  void startPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMSerializer

public DOMSerializer()
Method Detail

setNamespaceDeclarationAttribute

public void setNamespaceDeclarationAttribute(boolean pXmlDeclarationAttribute)

Sets whether XML declarations are being serialized as attributes or as SAX events (default).


isNamespaceDeclarationAttribute

public boolean isNamespaceDeclarationAttribute()

Returns whether XML declarations are being serialized as attributes or as SAX events (default).


setParentsNamespaceDeclarationDisabled

public void setParentsNamespaceDeclarationDisabled(boolean pParentsXmlDeclarationDisabled)

Returns whether XML declarations present in the parent nodes are being serialized (default) or not. This option takes effect only if the namespace declarations are sent as events. In other words, if the namespaceDeclarationAttribute properts is false.


isParentsNamespaceDeclarationDisabled

public boolean isParentsNamespaceDeclarationDisabled()

Sets whether XML declarations present in the parent nodes are being serialized (default) or not. This option takes effect only if the namespace declarations are sent as events. In other words, if the namespaceDeclarationAttribute properts is false.


doSerializeChilds

protected void doSerializeChilds(org.w3c.dom.Node pNode,
                                 org.xml.sax.ContentHandler pHandler)
                          throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

parentsStartPrefixMappingEvents

protected void parentsStartPrefixMappingEvents(org.w3c.dom.Node pNode,
                                               org.xml.sax.ContentHandler pHandler)
                                        throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

parentsEndPrefixMappingEvents

protected void parentsEndPrefixMappingEvents(org.w3c.dom.Node pNode,
                                             org.xml.sax.ContentHandler pHandler)
                                      throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

startPrefixMappingEvents

protected void startPrefixMappingEvents(org.w3c.dom.Node pNode,
                                        org.xml.sax.ContentHandler pHandler)
                                 throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endPrefixMappingEvents

protected void endPrefixMappingEvents(org.w3c.dom.Node pNode,
                                      org.xml.sax.ContentHandler pHandler)
                               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

serialize

public void serialize(org.w3c.dom.Node pNode,
                      org.xml.sax.ContentHandler pHandler)
               throws org.xml.sax.SAXException
Converts the given node pNode into a stream of SAX events, which are fired into the content handler pHandler.

Throws:
org.xml.sax.SAXException

doSerialize

protected void doSerialize(org.w3c.dom.Node pNode,
                           org.xml.sax.ContentHandler pHandler)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException