org.apache.ws.jaxme.util

Class DOMSerializer


public class DOMSerializer
extends java.lang.Object

Serializes a DOM node into a stream of SAX events.
Version:
$Id: DOMSerializer.java 232067 2005-03-10 11:14:08 +0100 (Thu, 10 Mar 2005) jochen $
Author:
Jochen Wiedmann

Method Summary

protected void
doSerialize(Node pNode, ContentHandler pHandler)
protected void
doSerializeChilds(Node pNode, ContentHandler pHandler)
protected void
endPrefixMappingEvents(Node pNode, 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(Node pNode, ContentHandler pHandler)
protected void
parentsStartPrefixMappingEvents(Node pNode, ContentHandler pHandler)
void
serialize(Node pNode, 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(Node pNode, ContentHandler pHandler)

Method Details

doSerialize

protected void doSerialize(Node pNode,
                           ContentHandler pHandler)
            throws SAXException

doSerializeChilds

protected void doSerializeChilds(Node pNode,
                                 ContentHandler pHandler)
            throws SAXException

endPrefixMappingEvents

protected void endPrefixMappingEvents(Node pNode,
                                      ContentHandler pHandler)
            throws SAXException

isNamespaceDeclarationAttribute

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

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.

parentsEndPrefixMappingEvents

protected void parentsEndPrefixMappingEvents(Node pNode,
                                             ContentHandler pHandler)
            throws SAXException

parentsStartPrefixMappingEvents

protected void parentsStartPrefixMappingEvents(Node pNode,
                                               ContentHandler pHandler)
            throws SAXException

serialize

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

setNamespaceDeclarationAttribute

public void setNamespaceDeclarationAttribute(boolean pXmlDeclarationAttribute)
Sets 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.

startPrefixMappingEvents

protected void startPrefixMappingEvents(Node pNode,
                                        ContentHandler pHandler)
            throws SAXException