public final class HTMLDocumentImpl extends DocumentImpl implements org.w3c.dom.html.HTMLDocument
Several methods create new nodes of all basic types (comment, text, element,
etc.). These methods create new nodes but do not place them in the document
tree. The nodes may be placed in the document tree using Node.appendChild(org.w3c.dom.Node) or Node.insertBefore(org.w3c.dom.Node, org.w3c.dom.Node), or
they may be placed in some other document tree.
Note: <FRAMESET> documents are not supported at the moment, neither
are direct document writing (open(), write(java.lang.String)) and HTTP attribute
methods (getURL(), getCookie()).
HTMLDocumentATTLIST_DECL_NODE, ELEMENT_DECL_NODE, PARAM_ENTITY_NODEATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
HTMLDocumentImpl() |
acquire, adoptNode, cloneInto, compareDocumentPosition, createAttribute, createAttribute, createAttributeNS, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createNodeIterator, createProcessingInstruction, createTextNode, equals, getBaseURI, getDoctype, getDocumentURI, getDomConfig, getEncoding, getFeature, getImplementation, getInputEncoding, getNamespaceURI, getNodeType, getStandalone, getStrictErrorChecking, getTextContent, getUserData, getVersion, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttributes, importNode, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lock, lookupNamespaceURI, lookupPrefix, normalizeDocument, registerElement, renameNode, setDocumentURI, setEncoding, setNodeValue, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setVersion, setXmlStandalone, setXmlVersion, toString, unlock, useElementFactoryappendChild, castOldChild, createNodeIterator, getChildNodes, getFirstChild, getLastChild, hasChildNodes, insertBefore, normalize, removeChild, removeInnerIterator, replaceChildgetAttributes, getLocalName, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, isReadOnly, makeReadOnly, setOwnerDocument, setPrefix, supportsfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentURI, getDomConfig, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersionappendChild, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDatapublic Element getDocumentElement()
getDocumentElement in interface DocumentgetDocumentElement in class DocumentImplpublic org.w3c.dom.html.HTMLElement getHead()
getDocumentElement(). If the element does not exist, one
is created.
Called by getTitle(), setTitle(java.lang.String), getBody() and
setBody(org.w3c.dom.html.HTMLElement) to assure the document has the <HEAD> element
correctly placed.
public String getTitle()
getTitle in interface org.w3c.dom.html.HTMLDocumentpublic void setTitle(String newTitle)
setTitle in interface org.w3c.dom.html.HTMLDocumentpublic org.w3c.dom.html.HTMLElement getBody()
getBody in interface org.w3c.dom.html.HTMLDocumentpublic void setBody(org.w3c.dom.html.HTMLElement newBody)
setBody in interface org.w3c.dom.html.HTMLDocumentpublic Element getElementById(String elementId)
getElementById in interface DocumentgetElementById in class DocumentImplpublic NodeList getElementsByName(String elementName)
getElementsByName in interface org.w3c.dom.html.HTMLDocumentpublic final NodeList getElementsByTagName(String tagName)
getElementsByTagName in interface DocumentgetElementsByTagName in class DocumentImplpublic final NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS in interface DocumentgetElementsByTagNameNS in class DocumentImplpublic Element createElementNS(String namespaceURI, String qualifiedName)
createElementNS in interface DocumentcreateElementNS in class DocumentImplpublic Element createElement(String tagName) throws DOMException
createElement in interface DocumentcreateElement in class DocumentImplDOMExceptionpublic String getReferrer()
getReferrer in interface org.w3c.dom.html.HTMLDocumentpublic String getDomain()
getDomain in interface org.w3c.dom.html.HTMLDocumentpublic String getURL()
getURL in interface org.w3c.dom.html.HTMLDocumentpublic String getCookie()
getCookie in interface org.w3c.dom.html.HTMLDocumentpublic void setCookie(String cookie)
setCookie in interface org.w3c.dom.html.HTMLDocumentpublic org.w3c.dom.html.HTMLCollection getImages()
getImages in interface org.w3c.dom.html.HTMLDocumentpublic org.w3c.dom.html.HTMLCollection getApplets()
getApplets in interface org.w3c.dom.html.HTMLDocumentpublic org.w3c.dom.html.HTMLCollection getLinks()
getLinks in interface org.w3c.dom.html.HTMLDocumentpublic org.w3c.dom.html.HTMLCollection getForms()
getForms in interface org.w3c.dom.html.HTMLDocumentpublic org.w3c.dom.html.HTMLCollection getAnchors()
getAnchors in interface org.w3c.dom.html.HTMLDocumentpublic void open()
open in interface org.w3c.dom.html.HTMLDocumentpublic void close()
close in interface org.w3c.dom.html.HTMLDocumentpublic void write(String text)
write in interface org.w3c.dom.html.HTMLDocumentpublic void writeln(String text)
writeln in interface org.w3c.dom.html.HTMLDocumentpublic Object clone()
clone in class DocumentImplpublic Node cloneNode(boolean deep)
cloneNode in interface NodecloneNode in class DocumentImplprotected NodeImpl castNewChild(Node newChild) throws DOMException
ParentNodeImplThe following rules govern the allowed newChild types:
Attr, newChild must be
either a Text or an EntityReference
DocumentType, newChild must be
either an Entity or a Notation.
Element, a CharacterData derived type, a DocumentFragment, an EntityReference or a ProcessingInstruction.
castNewChild in class ParentNodeImplnewChild - New child nodeNodeImplDOMException - HIERARCHY_REQUEST_ERR
newChild is null, does not belong to this DOM, or its node
type is not supported for this parentPhantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.