Class ElementImpl

    • Field Detail

      • attributes

        protected java.util.Map attributes
    • Constructor Detail

      • ElementImpl

        public ElementImpl​(java.lang.String name)
    • Method Detail

      • getAttributes

        public org.w3c.dom.NamedNodeMap getAttributes()
        Specified by:
        getAttributes in interface org.w3c.dom.Node
        Overrides:
        getAttributes in class NodeImpl
      • hasAttributes

        public boolean hasAttributes()
        Specified by:
        hasAttributes in interface org.w3c.dom.Node
        Overrides:
        hasAttributes in class NodeImpl
      • equalAttributes

        public boolean equalAttributes​(org.w3c.dom.Node arg)
        Overrides:
        equalAttributes in class NodeImpl
      • getId

        public java.lang.String getId()
      • setId

        public void setId​(java.lang.String id)
      • getTitle

        public java.lang.String getTitle()
      • setTitle

        public void setTitle​(java.lang.String title)
      • getLang

        public java.lang.String getLang()
      • setLang

        public void setLang​(java.lang.String lang)
      • getDir

        public java.lang.String getDir()
      • setDir

        public void setDir​(java.lang.String dir)
      • getAttribute

        public final java.lang.String getAttribute​(java.lang.String name)
        Specified by:
        getAttribute in interface org.w3c.dom.Element
      • getAttributeNode

        public org.w3c.dom.Attr getAttributeNode​(java.lang.String name)
        Specified by:
        getAttributeNode in interface org.w3c.dom.Element
      • getAttributeNodeNS

        public org.w3c.dom.Attr getAttributeNodeNS​(java.lang.String namespaceURI,
                                                   java.lang.String localName)
                                            throws org.w3c.dom.DOMException
        Specified by:
        getAttributeNodeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • getAttributeNS

        public java.lang.String getAttributeNS​(java.lang.String namespaceURI,
                                               java.lang.String localName)
                                        throws org.w3c.dom.DOMException
        Specified by:
        getAttributeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • isTagName

        protected static boolean isTagName​(org.w3c.dom.Node node,
                                           java.lang.String name)
      • getElementsByTagName

        public org.w3c.dom.NodeList getElementsByTagName​(java.lang.String name)
        Specified by:
        getElementsByTagName in interface org.w3c.dom.Element
      • getElementsByTagNameNS

        public org.w3c.dom.NodeList getElementsByTagNameNS​(java.lang.String namespaceURI,
                                                           java.lang.String localName)
                                                    throws org.w3c.dom.DOMException
        Specified by:
        getElementsByTagNameNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • getSchemaTypeInfo

        public org.w3c.dom.TypeInfo getSchemaTypeInfo()
        Specified by:
        getSchemaTypeInfo in interface org.w3c.dom.Element
      • getTagName

        public java.lang.String getTagName()
        Specified by:
        getTagName in interface org.w3c.dom.Element
      • hasAttribute

        public boolean hasAttribute​(java.lang.String name)
        Specified by:
        hasAttribute in interface org.w3c.dom.Element
      • hasAttributeNS

        public boolean hasAttributeNS​(java.lang.String namespaceURI,
                                      java.lang.String localName)
                               throws org.w3c.dom.DOMException
        Specified by:
        hasAttributeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • removeAttribute

        public void removeAttribute​(java.lang.String name)
                             throws org.w3c.dom.DOMException
        Specified by:
        removeAttribute in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • removeAttributeNode

        public org.w3c.dom.Attr removeAttributeNode​(org.w3c.dom.Attr oldAttr)
                                             throws org.w3c.dom.DOMException
        Specified by:
        removeAttributeNode in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • removeAttributeNS

        public void removeAttributeNS​(java.lang.String namespaceURI,
                                      java.lang.String localName)
                               throws org.w3c.dom.DOMException
        Specified by:
        removeAttributeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • assignAttributeField

        protected void assignAttributeField​(java.lang.String normalName,
                                            java.lang.String value)
      • normalizeAttributeName

        protected final java.lang.String normalizeAttributeName​(java.lang.String name)
      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.String value)
                          throws org.w3c.dom.DOMException
        Specified by:
        setAttribute in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • setAttributeImpl

        public void setAttributeImpl​(java.lang.String name,
                                     java.lang.String value)
                              throws org.w3c.dom.DOMException
        Fast method to set attributes. It is not thread safe. Calling thread should hold a treeLock.
        Throws:
        org.w3c.dom.DOMException
      • setAttributeNode

        public org.w3c.dom.Attr setAttributeNode​(org.w3c.dom.Attr newAttr)
                                          throws org.w3c.dom.DOMException
        Specified by:
        setAttributeNode in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • setAttributeNodeNS

        public org.w3c.dom.Attr setAttributeNodeNS​(org.w3c.dom.Attr newAttr)
                                            throws org.w3c.dom.DOMException
        Specified by:
        setAttributeNodeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • setAttributeNS

        public void setAttributeNS​(java.lang.String namespaceURI,
                                   java.lang.String qualifiedName,
                                   java.lang.String value)
                            throws org.w3c.dom.DOMException
        Specified by:
        setAttributeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • setIdAttribute

        public void setIdAttribute​(java.lang.String name,
                                   boolean isId)
                            throws org.w3c.dom.DOMException
        Specified by:
        setIdAttribute in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • setIdAttributeNode

        public void setIdAttributeNode​(org.w3c.dom.Attr idAttr,
                                       boolean isId)
                                throws org.w3c.dom.DOMException
        Specified by:
        setIdAttributeNode in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • setIdAttributeNS

        public void setIdAttributeNS​(java.lang.String namespaceURI,
                                     java.lang.String localName,
                                     boolean isId)
                              throws org.w3c.dom.DOMException
        Specified by:
        setIdAttributeNS in interface org.w3c.dom.Element
        Throws:
        org.w3c.dom.DOMException
      • getLocalName

        public java.lang.String getLocalName()
        Specified by:
        getLocalName in interface org.w3c.dom.Node
        Specified by:
        getLocalName in class NodeImpl
      • getNodeName

        public java.lang.String getNodeName()
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Specified by:
        getNodeName in class NodeImpl
      • getNodeType

        public short getNodeType()
        Specified by:
        getNodeType in interface org.w3c.dom.Node
        Specified by:
        getNodeType in class NodeImpl
      • getNodeValue

        public java.lang.String getNodeValue()
                                      throws org.w3c.dom.DOMException
        Specified by:
        getNodeValue in interface org.w3c.dom.Node
        Specified by:
        getNodeValue in class NodeImpl
        Throws:
        org.w3c.dom.DOMException
      • setNodeValue

        public void setNodeValue​(java.lang.String nodeValue)
                          throws org.w3c.dom.DOMException
        Specified by:
        setNodeValue in interface org.w3c.dom.Node
        Specified by:
        setNodeValue in class NodeImpl
        Throws:
        org.w3c.dom.DOMException
      • getRawInnerText

        protected java.lang.String getRawInnerText​(boolean includeComment)
        Gets inner text of the element, possibly including text in comments. This can be used to get Javascript code out of a SCRIPT element.
        Parameters:
        includeComment -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class NodeImpl
      • setInnerText

        public void setInnerText​(java.lang.String newText)
      • createSimilarNode

        protected org.w3c.dom.Node createSimilarNode()
        Description copied from class: NodeImpl
        Should create a node with some cloned properties, like the node name, but not attributes or children.
        Specified by:
        createSimilarNode in class NodeImpl
      • htmlEncodeChildText

        protected java.lang.String htmlEncodeChildText​(java.lang.String text)
        Overrides:
        htmlEncodeChildText in class NodeImpl