Class DomMapperBase

    • Field Detail

      • m_document

        protected Document m_document
        Actual document instance (required by DOM).
      • m_defaultNamespaceURI

        protected String m_defaultNamespaceURI
        Current default namespace URI (null if not determined).
      • m_defaultNamespaceIndex

        protected int m_defaultNamespaceIndex
        Current default namespace index.
    • Constructor Detail

      • DomMapperBase

        protected DomMapperBase()
                         throws org.jibx.runtime.JiBXException
        Constructor. Initializes the document used by this marshaller/unmarshaller instance as the owner of all DOM components.
        Throws:
        org.jibx.runtime.JiBXException - on error creating document
    • Method Detail

      • marshalNode

        protected void marshalNode​(Node node)
                            throws org.jibx.runtime.JiBXException,
                                   IOException
        Marshal node.
        Parameters:
        node - node to be marshalled
        Throws:
        org.jibx.runtime.JiBXException - on error in marshalling
        IOException - on error writing to output
      • marshalContent

        protected void marshalContent​(NodeList content)
                               throws org.jibx.runtime.JiBXException,
                                      IOException
        Marshal node list.
        Parameters:
        content - list of nodes to marshal
        Throws:
        org.jibx.runtime.JiBXException - on error in marshalling
        IOException - on error writing to output
      • marshalElement

        protected void marshalElement​(Element element)
                               throws org.jibx.runtime.JiBXException,
                                      IOException
        Marshal element with all attributes and content.
        Parameters:
        element - element to be marshalled
        Throws:
        org.jibx.runtime.JiBXException - on error in marshalling
        IOException - on error writing to output
      • unmarshalNode

        protected Node unmarshalNode()
                              throws org.jibx.runtime.JiBXException,
                                     IOException
        Unmarshal single node. This unmarshals the next node from the input stream, up to the close tag of the containing element.
        Returns:
        unmarshalled node
        Throws:
        org.jibx.runtime.JiBXException - on error in unmarshalling
        IOException - on error reading input
      • unmarshalContent

        protected void unmarshalContent​(Node parent)
                                 throws org.jibx.runtime.JiBXException,
                                        IOException
        Unmarshal node content. This unmarshals everything up to the containing element close tag, adding each component to the content list supplied. On return, the parse position will always be at an END_TAG.
        Parameters:
        parent - node to which children are to be added
        Throws:
        org.jibx.runtime.JiBXException - on error in unmarshalling
        IOException - on error reading input
      • unmarshalElement

        protected Element unmarshalElement()
                                    throws org.jibx.runtime.JiBXException,
                                           IOException
        Unmarshal element with all attributes and content. This must be called with the unmarshalling context positioned at a START_TAG event.
        Returns:
        unmarshalled element
        Throws:
        org.jibx.runtime.JiBXException - on error in unmarshalling
        IOException - on error reading input