public class DomMapperBase extends DocumentModelMapperBase
Base implementation for custom marshaller/unmarshallers to DOM representation. This provides the basic code used for both single element and content list handling.
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_defaultNamespaceIndex
Current default namespace index.
|
protected String |
m_defaultNamespaceURI
Current default namespace URI (
null if not determined). |
protected Document |
m_document
Actual document instance (required by DOM).
|
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE| Modifier | Constructor and Description |
|---|---|
protected |
DomMapperBase()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
marshalContent(NodeList content)
Marshal node list.
|
protected void |
marshalElement(Element element)
Marshal element with all attributes and content.
|
protected void |
marshalNode(Node node)
Marshal node.
|
protected void |
unmarshalContent(Node parent)
Unmarshal node content.
|
protected Element |
unmarshalElement()
Unmarshal element with all attributes and content.
|
protected Node |
unmarshalNode()
Unmarshal single node.
|
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespaceprotected Document m_document
protected String m_defaultNamespaceURI
null if not determined).protected int m_defaultNamespaceIndex
protected DomMapperBase()
throws org.jibx.runtime.JiBXException
org.jibx.runtime.JiBXException - on error creating documentprotected void marshalNode(Node node) throws org.jibx.runtime.JiBXException, IOException
node - node to be marshalledorg.jibx.runtime.JiBXException - on error in marshallingIOException - on error writing to outputprotected void marshalContent(NodeList content) throws org.jibx.runtime.JiBXException, IOException
content - list of nodes to marshalorg.jibx.runtime.JiBXException - on error in marshallingIOException - on error writing to outputprotected void marshalElement(Element element) throws org.jibx.runtime.JiBXException, IOException
element - element to be marshalledorg.jibx.runtime.JiBXException - on error in marshallingIOException - on error writing to outputprotected Node unmarshalNode() throws org.jibx.runtime.JiBXException, IOException
org.jibx.runtime.JiBXException - on error in unmarshallingIOException - on error reading inputprotected void unmarshalContent(Node parent) throws org.jibx.runtime.JiBXException, IOException
parent - node to which children are to be addedorg.jibx.runtime.JiBXException - on error in unmarshallingIOException - on error reading inputprotected Element unmarshalElement() throws org.jibx.runtime.JiBXException, IOException
org.jibx.runtime.JiBXException - on error in unmarshallingIOException - on error reading inputCopyright © 2005–2020 jibx.org. All rights reserved.