Package org.w3c.tidy

Class DOMDocumentImpl

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

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

      • DOMDocumentImpl

        protected DOMDocumentImpl​(Node adaptee)
        Instantiates a new Dom document with a default tag table.
        Parameters:
        adaptee - tidy Node
    • Method Detail

      • getNodeName

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

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

        public org.w3c.dom.DocumentType getDoctype()
        Specified by:
        getDoctype in interface org.w3c.dom.Document
        See Also:
        Document.getDoctype()
      • getImplementation

        public org.w3c.dom.DOMImplementation getImplementation()
        Specified by:
        getImplementation in interface org.w3c.dom.Document
        See Also:
        Document.getImplementation()
        To do:
        DOM level 2 getImplementation() Not implemented. Throws NOT_SUPPORTED_ERR.
      • getDocumentElement

        public org.w3c.dom.Element getDocumentElement()
        Specified by:
        getDocumentElement in interface org.w3c.dom.Document
        See Also:
        Document.getDocumentElement()
      • createElement

        public org.w3c.dom.Element createElement​(java.lang.String tagName)
                                          throws org.w3c.dom.DOMException
        Specified by:
        createElement in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.createElement(java.lang.String)
      • createDocumentFragment

        public org.w3c.dom.DocumentFragment createDocumentFragment()
        Specified by:
        createDocumentFragment in interface org.w3c.dom.Document
        See Also:
        Document.createDocumentFragment()
        To do:
        DOM level 2 createDocumentFragment() Not implemented. Throws NOT_SUPPORTED_ERR.
      • createTextNode

        public org.w3c.dom.Text createTextNode​(java.lang.String data)
        Specified by:
        createTextNode in interface org.w3c.dom.Document
        See Also:
        Document.createTextNode(java.lang.String)
      • createComment

        public org.w3c.dom.Comment createComment​(java.lang.String data)
        Specified by:
        createComment in interface org.w3c.dom.Document
        See Also:
        Document.createComment(java.lang.String)
      • createCDATASection

        public org.w3c.dom.CDATASection createCDATASection​(java.lang.String data)
                                                    throws org.w3c.dom.DOMException
        Specified by:
        createCDATASection in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.createCDATASection(java.lang.String)
        To do:
        DOM level 2 createCDATASection() Not supported. Throws NOT_SUPPORTED_ERR.
      • createProcessingInstruction

        public org.w3c.dom.ProcessingInstruction createProcessingInstruction​(java.lang.String target,
                                                                             java.lang.String data)
                                                                      throws org.w3c.dom.DOMException
        Specified by:
        createProcessingInstruction in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.createProcessingInstruction(java.lang.String, java.lang.String)
        To do:
        DOM level 2 createProcessingInstruction() Not supported. Throws NOT_SUPPORTED_ERR.
      • createAttribute

        public org.w3c.dom.Attr createAttribute​(java.lang.String name)
                                         throws org.w3c.dom.DOMException
        Specified by:
        createAttribute in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.createAttribute(java.lang.String)
      • createEntityReference

        public org.w3c.dom.EntityReference createEntityReference​(java.lang.String name)
                                                          throws org.w3c.dom.DOMException
        Specified by:
        createEntityReference in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.createEntityReference(java.lang.String)
        To do:
        DOM level 2 createEntityReference() Not supported. Throws NOT_SUPPORTED_ERR.
      • getElementsByTagName

        public org.w3c.dom.NodeList getElementsByTagName​(java.lang.String tagname)
        Specified by:
        getElementsByTagName in interface org.w3c.dom.Document
        See Also:
        Document.getElementsByTagName(java.lang.String)
      • importNode

        public org.w3c.dom.Node importNode​(org.w3c.dom.Node importedNode,
                                           boolean deep)
                                    throws org.w3c.dom.DOMException
        Specified by:
        importNode in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.importNode(org.w3c.dom.Node, boolean)
        To do:
        DOM level 2 importNode() Not supported. Throws NOT_SUPPORTED_ERR.
      • createAttributeNS

        public org.w3c.dom.Attr createAttributeNS​(java.lang.String namespaceURI,
                                                  java.lang.String qualifiedName)
                                           throws org.w3c.dom.DOMException
        Specified by:
        createAttributeNS in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.createAttributeNS(java.lang.String, java.lang.String)
        To do:
        DOM level 2 createAttributeNS() Not supported. Throws NOT_SUPPORTED_ERR.
      • createElementNS

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

        public org.w3c.dom.Element getElementById​(java.lang.String elementId)
        Specified by:
        getElementById in interface org.w3c.dom.Document
        See Also:
        Document.getElementById(java.lang.String)
        To do:
        DOM level 2 getElementById() Not implemented. Returns null.
      • adoptNode

        public org.w3c.dom.Node adoptNode​(org.w3c.dom.Node source)
                                   throws org.w3c.dom.DOMException
        Specified by:
        adoptNode in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.adoptNode(org.w3c.dom.Node)
        To do:
        DOM level 3 adoptNode() Not implemented.
      • getDocumentURI

        public java.lang.String getDocumentURI()
        Specified by:
        getDocumentURI in interface org.w3c.dom.Document
        See Also:
        Document.getDocumentURI()
        To do:
        DOM level 3 getDocumentURI() Not implemented. Returns null.
      • getDomConfig

        public org.w3c.dom.DOMConfiguration getDomConfig()
        Specified by:
        getDomConfig in interface org.w3c.dom.Document
        See Also:
        Document.getDomConfig()
        To do:
        DOM level 3 getDomConfig() Not implemented. Returns null.
      • getInputEncoding

        public java.lang.String getInputEncoding()
        Specified by:
        getInputEncoding in interface org.w3c.dom.Document
        See Also:
        Document.getInputEncoding()
        To do:
        DOM level 3 getInputEncoding() Not implemented. Returns null.
      • getStrictErrorChecking

        public boolean getStrictErrorChecking()
        Specified by:
        getStrictErrorChecking in interface org.w3c.dom.Document
        See Also:
        Document.getStrictErrorChecking()
        To do:
        DOM level 3 getStrictErrorChecking() Not implemented. Returns true.
      • getXmlEncoding

        public java.lang.String getXmlEncoding()
        Specified by:
        getXmlEncoding in interface org.w3c.dom.Document
        See Also:
        Document.getXmlEncoding()
        To do:
        DOM level 3 getXmlEncoding() Not implemented. Returns null.
      • getXmlStandalone

        public boolean getXmlStandalone()
        Specified by:
        getXmlStandalone in interface org.w3c.dom.Document
        See Also:
        Document.getXmlStandalone()
        To do:
        DOM level 3 getXmlStandalone() Not implemented. Returns false.
      • getXmlVersion

        public java.lang.String getXmlVersion()
        Specified by:
        getXmlVersion in interface org.w3c.dom.Document
        See Also:
        Document.getXmlVersion()
        To do:
        DOM level 3 getXmlVersion() Not implemented. Always returns "1.0".
      • normalizeDocument

        public void normalizeDocument()
        Specified by:
        normalizeDocument in interface org.w3c.dom.Document
        See Also:
        Document.normalizeDocument()
        To do:
        DOM level 3 normalizeDocument() Not implemented. Do nothing.
      • renameNode

        public org.w3c.dom.Node renameNode​(org.w3c.dom.Node n,
                                           java.lang.String namespaceURI,
                                           java.lang.String qualifiedName)
                                    throws org.w3c.dom.DOMException
        Specified by:
        renameNode in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.renameNode(org.w3c.dom.Node, java.lang.String, java.lang.String)
        To do:
        DOM level 3 renameNode() Not implemented. Throws NOT_SUPPORTED_ERR.
      • setDocumentURI

        public void setDocumentURI​(java.lang.String documentURI)
        Specified by:
        setDocumentURI in interface org.w3c.dom.Document
        See Also:
        Document.setDocumentURI(java.lang.String)
        To do:
        DOM level 3 setDocumentURI() Not implemented. Do nothing.
      • setStrictErrorChecking

        public void setStrictErrorChecking​(boolean strictErrorChecking)
        Specified by:
        setStrictErrorChecking in interface org.w3c.dom.Document
        See Also:
        Document.setStrictErrorChecking(boolean)
        To do:
        DOM level 3 setStrictErrorChecking() Not implemented. Do nothing.
      • setXmlStandalone

        public void setXmlStandalone​(boolean xmlStandalone)
                              throws org.w3c.dom.DOMException
        Specified by:
        setXmlStandalone in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.setXmlStandalone(boolean)
        To do:
        DOM level 3 setXmlStandalone() Not implemented. Do nothing.
      • setXmlVersion

        public void setXmlVersion​(java.lang.String xmlVersion)
                           throws org.w3c.dom.DOMException
        Specified by:
        setXmlVersion in interface org.w3c.dom.Document
        Throws:
        org.w3c.dom.DOMException
        See Also:
        Document.setXmlVersion(java.lang.String)
        To do:
        DOM level 3 setXmlVersion() Not implemented. Do nothing.