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.
Constructor and Description |
---|
DOMSerializer() |
Modifier and Type | Method and Description |
---|---|
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) |
public void setNamespaceDeclarationAttribute(boolean pXmlDeclarationAttribute)
Sets whether XML declarations are being serialized as attributes or as SAX events (default).
public boolean isNamespaceDeclarationAttribute()
Returns whether XML declarations are being serialized as attributes or as SAX events (default).
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.
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.
protected void doSerializeChilds(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void parentsStartPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void parentsEndPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void startPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void endPrefixMappingEvents(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void serialize(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
pHandler
.org.xml.sax.SAXException
protected void doSerialize(org.w3c.dom.Node pNode, org.xml.sax.ContentHandler pHandler) throws org.xml.sax.SAXException
org.xml.sax.SAXException