Class DOMOutputElement

  • All Implemented Interfaces:
    javax.xml.namespace.NamespaceContext

    public final class DOMOutputElement
    extends OutputElementBase
    Context object that holds information about an open element (one for which START_ELEMENT has been sent, but no END_ELEMENT)
    • Field Detail

      • mParent

        private DOMOutputElement mParent
        Reference to the parent element, element enclosing this element. Null for root element. Non-final to allow temporary pooling (on per-writer basis, to keep these short-lived).
      • mRootNode

        private final org.w3c.dom.Node mRootNode
        DOM node that is the root under which content is written, in case where there is no parent (mParent == null). If mParent is not null, this will be null. Value is of type Document, DocumentFragment or Element
      • mElement

        private org.w3c.dom.Element mElement
        Actual DOM element for which this element object acts as a proxy.
      • mDefaultNsSet

        private boolean mDefaultNsSet
    • Constructor Detail

      • DOMOutputElement

        private DOMOutputElement​(org.w3c.dom.Node rootNode)
        Constructor for the virtual root element
    • Method Detail

      • relink

        private void relink​(DOMOutputElement parent,
                            org.w3c.dom.Element element)
        Method called to reuse a pooled instance.
      • createRoot

        public static DOMOutputElement createRoot​(org.w3c.dom.Node rootNode)
      • createAndAttachChild

        protected DOMOutputElement createAndAttachChild​(org.w3c.dom.Element element)
        Simplest factory method, which gets called when a 1-argument element output method is called. It is, then, assumed to use the default namespace. Will both create the child element and attach it to parent element, or lacking own owner document.
      • createChild

        protected DOMOutputElement createChild​(org.w3c.dom.Element element)
      • addToPool

        protected void addToPool​(DOMOutputElement poolHead)
        Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.
      • getNameDesc

        public java.lang.String getNameDesc()
        Specified by:
        getNameDesc in class OutputElementBase
        Returns:
        String presentation of the fully-qualified name, in "prefix:localName" format (no URI). Useful for error and debugging messages.
      • appendNode

        protected void appendNode​(org.w3c.dom.Node n)
      • addAttribute

        protected void addAttribute​(java.lang.String pname,
                                    java.lang.String value)
      • addAttribute

        protected void addAttribute​(java.lang.String uri,
                                    java.lang.String qname,
                                    java.lang.String value)
      • appendChild

        public void appendChild​(org.w3c.dom.Node n)