org.apache.ws.jaxme.xs.impl
Class DOMSerializer

java.lang.Object
  extended by org.apache.ws.jaxme.xs.impl.DOMSerializer

public class DOMSerializer
extends java.lang.Object

Serializes a DOM node into a stream of SAX events. This code is duplicated and copied from DOMSerializer. The reason for duplicating the code is, that the JaxMe runtime should not depend on JaxMeXS. On the other hand, JaxMeXS should not depend on JaxMe.

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)
          Serializes the given node by firing SAX events into the SAX 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
Serializes the given node by firing SAX events into the SAX 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