Interface XMLNode<T>

    • Method Detail

      • startElement

        void startElement​(XMLElement element,
                          Attributes attributes)
        notification of the start of an XML element tag in the processed XML source file.
        Parameters:
        element - the XML element type name
        attributes - the specified or defaultted attritutes
      • setElementValue

        void setElementValue​(XMLElement element,
                             String value)
        sets the value of an XML element
        Parameters:
        element - the XML element type name
        value - the element value
      • endElement

        boolean endElement​(XMLElement element)
        notification of the end of an XML element in the source XML file.
        Parameters:
        element - the XML element type name
        Returns:
        true if this node is done with the processing of elements in the processing
      • handlesElement

        boolean handlesElement​(XMLElement element)
        Return true if the XMLNode is responisble for handling the XML element
        Parameters:
        element - the XML element type name
        Returns:
        true if the node processes this element name
      • getHandlerFor

        XMLNode getHandlerFor​(XMLElement element)
        Return the XMLNode implementation respionsible for handling the sub-element of the current node
        Parameters:
        element - the XML element type name
        Returns:
        XMLNode implementation responsible for handling the XML tag
      • getParentNode

        XMLNode getParentNode()
        Returns:
        the parent node for this XMLNode
      • getRootNode

        XMLNode getRootNode()
        Returns:
        the root node for this XMLNode
      • getXMLPath

        String getXMLPath()
        Returns:
        the XMLPath for the element name this node is handling. The XML path can be a absolute or a relative XMLPath.
      • getDescriptor

        T getDescriptor()
        Returns:
        the Descriptor subclass that was populated by reading the source XML file
      • addDescriptor

        void addDescriptor​(Object descriptor)
        Add a new descriptor to the current descriptor associated with this node. This method is usually called by sub XMLNodes (Returned by getHandlerFor) to add the result of their parsing to the main descriptor.
        Parameters:
        descriptor - the new descriptor to be added to the current descriptor.
      • writeDescriptor

        Node writeDescriptor​(Node parent,
                             T descriptor)
        write the descriptor to an JAXP DOM node and return it
        Parameters:
        parent - node in the DOM tree
        descriptor - the descriptor to be written
        Returns:
        the JAXP DOM node for this descriptor
      • addPrefixMapping

        void addPrefixMapping​(String prefix,
                              String uri)
        notify of a new prefix mapping used from this node
      • resolvePrefix

        String resolvePrefix​(XMLElement element,
                             String prefix)
        Resolve a QName prefix to its corresponding Namespace URI by searching up node chain starting with the child.