Package org.w3c.tidy

Class DOMElementImpl

  • All Implemented Interfaces:
    org.w3c.dom.Element, org.w3c.dom.Node

    public class DOMElementImpl
    extends DOMNodeImpl
    implements org.w3c.dom.Element
    DOMElementImpl.
    Version:
    $Revision: 738 $ ($Author: fgiust $)
    Author:
    Dave Raggett dsr@w3.org , Andy Quick ac.quick@sympatico.ca (translation to Java), Fabrizio Giustina
    • Constructor Detail

      • DOMElementImpl

        protected DOMElementImpl​(Node adaptee)
        Instantiates a new DOM element.
        Parameters:
        adaptee - Tidy Node.
    • Method Detail

      • getNodeType

        public short getNodeType()
        Specified by:
        getNodeType in interface org.w3c.dom.Node
        Overrides:
        getNodeType in class DOMNodeImpl
        See Also:
        Node.getNodeType()
      • getTagName

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

        public java.lang.String getAttribute​(java.lang.String name)
        Specified by:
        getAttribute in interface org.w3c.dom.Element
        See Also:
        Element.getAttribute(java.lang.String)
      • 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
        See Also:
        Element.setAttribute(java.lang.String, java.lang.String)
      • 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
        See Also:
        Element.removeAttribute(java.lang.String)
      • getAttributeNode

        public org.w3c.dom.Attr getAttributeNode​(java.lang.String name)
        Specified by:
        getAttributeNode in interface org.w3c.dom.Element
        See Also:
        Element.getAttributeNode(java.lang.String)
      • 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
        See Also:
        Element.setAttributeNode(org.w3c.dom.Attr)
      • 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
        See Also:
        Element.removeAttributeNode(org.w3c.dom.Attr)
      • getElementsByTagName

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

        public void normalize()
        Description copied from class: DOMNodeImpl
        Do nothing: text nodes in html documents are important and jtidy already removes useless text during parsing.
        Specified by:
        normalize in interface org.w3c.dom.Node
        Overrides:
        normalize in class DOMNodeImpl
        See Also:
        Node.normalize()
        To do:
        DOM level 2 getOwnerDocument() Not supported. Do nothing.
      • getAttributeNS

        public java.lang.String getAttributeNS​(java.lang.String namespaceURI,
                                               java.lang.String localName)
        Specified by:
        getAttributeNS in interface org.w3c.dom.Element
        See Also:
        Element.getAttributeNS(java.lang.String, java.lang.String)
        To do:
        DOM level 2 getAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • 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
        See Also:
        Element.setAttributeNS(java.lang.String, java.lang.String, java.lang.String)
        To do:
        DOM level 2 setAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • 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
        See Also:
        Element.removeAttributeNS(java.lang.String, java.lang.String)
        To do:
        DOM level 2 removeAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • getAttributeNodeNS

        public org.w3c.dom.Attr getAttributeNodeNS​(java.lang.String namespaceURI,
                                                   java.lang.String localName)
        Specified by:
        getAttributeNodeNS in interface org.w3c.dom.Element
        See Also:
        Element.getAttributeNodeNS(java.lang.String, java.lang.String)
        To do:
        DOM level 2 getAttributeNodeNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • 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
        See Also:
        Element.setAttributeNodeNS(org.w3c.dom.Attr)
        To do:
        DOM level 2 setAttributeNodeNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • getElementsByTagNameNS

        public org.w3c.dom.NodeList getElementsByTagNameNS​(java.lang.String namespaceURI,
                                                           java.lang.String localName)
        Specified by:
        getElementsByTagNameNS in interface org.w3c.dom.Element
        See Also:
        Element.getElementsByTagNameNS(java.lang.String, java.lang.String)
        To do:
        DOM level 2 getElementsByTagNameNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • hasAttribute

        public boolean hasAttribute​(java.lang.String name)
        Specified by:
        hasAttribute in interface org.w3c.dom.Element
        See Also:
        Element.hasAttribute(java.lang.String)
        To do:
        DOM level 2 hasAttribute() Not supported. Returns false.
      • hasAttributeNS

        public boolean hasAttributeNS​(java.lang.String namespaceURI,
                                      java.lang.String localName)
        Specified by:
        hasAttributeNS in interface org.w3c.dom.Element
        See Also:
        Element.hasAttributeNS(java.lang.String, java.lang.String)
        To do:
        DOM level 2 hasAttribute() Not supported. Returns false.
      • getSchemaTypeInfo

        public org.w3c.dom.TypeInfo getSchemaTypeInfo()
        Specified by:
        getSchemaTypeInfo in interface org.w3c.dom.Element
        See Also:
        Element.getSchemaTypeInfo()
        To do:
        DOM level 3 getSchemaTypeInfo() Not supported. Returns null.
      • 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
        See Also:
        Element.setIdAttribute(java.lang.String, boolean)
        To do:
        DOM level 3 setIdAttribute() Not supported. Throws NOT_SUPPORTED_ERR.
      • 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
        See Also:
        Element.setIdAttributeNode(org.w3c.dom.Attr, boolean)
        To do:
        DOM level 3 setIdAttributeNode() Not supported. Throws NOT_SUPPORTED_ERR.
      • 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
        See Also:
        Element.setIdAttributeNS(java.lang.String, java.lang.String, boolean)
        To do:
        DOM level 3 setIdAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.