public class HTMLDocumentImp extends org.apache.xerces.dom.DocumentImpl implements HTMLDocument, Serializable
eventListeners, iteratorReferenceQueue, iterators, mutationEvents, rangeReferenceQueue, rangesactualEncoding, allowGrammarAccess, changes, docElement, docType, encoding, errorChecking, fDocumentURI, identifiers, standalone, userData, version, xmlVersionChangedfirstChild, fNodeListCache, ownerDocumentDOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_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| Modifier | Constructor and Description |
|---|---|
protected |
HTMLDocumentImp()
Protected: outside this package, only subclasses can instantiate.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
appendChild(Node newChild)
First adopts the new child, then appends it.
|
HTMLDocumentImp |
cloneNode(boolean deep) |
void |
close() |
protected void |
copy(HTMLDocumentImp from,
boolean deep)
Copy fields from a document to this document.
|
Attr |
createAttribute(String name) |
<T extends HTMLElement> |
createElement(Class<T> c)
Create an element of this class.
|
HTMLElement |
createElement(String tag)
Overrides org.apache.html.dom.HTMLDocumentImpl#createElement(java.lang.String)
|
Element |
createElementNS(String namespaceURI,
String qualifiedName)
The HTML5 parser calls here, and this method delegates to createElement(tag)
so that we really get an HTMLElement.
|
Element |
createElementNS(String namespaceURI,
String qualifiedName,
String localpart) |
void |
deleter(String name)
Deletes a named element.
|
boolean |
execCommand(String commandId) |
boolean |
execCommand(String commandId,
boolean showId) |
boolean |
execCommand(String commandId,
boolean showId,
String value) |
HTMLElement |
get(String name)
Gets an element by name.
|
Element |
getActiveElement() |
org.w3c.dom.html.HTMLCollection |
getAnchors()
Not implemented.
|
org.w3c.dom.html.HTMLCollection |
getApplets()
Not implemented.
|
HTMLBodyElement |
getBody()
Returns null if there is no body.
|
String |
getCookie() |
WindowProxy |
getDefaultView() |
String |
getDesignMode() |
String |
getDir() |
HTMLHtmlElement |
getDocumentElement()
Returns null if there is no html element yet.
|
String |
getDomain() |
HTMLElement |
getElementById(String id) |
HTMLElement |
getElementByTagName(String tag)
Convenience: gets the first element with that tag,
or null if there are none.
|
HTMLCollection<HTMLElement> |
getElementsByName(String name) |
NodeList |
getElementsByTagName(String tag) |
NodeList |
getElementsByTagNameNS(String namespace,
String key) |
HTMLCollection<HTMLEmbedElement> |
getEmbeds() |
HTMLCollection<HTMLFormElement> |
getForms() |
HTMLHeadElement |
getHead()
Returns null if there is no head element yet.
|
HTMLHtmlElement |
getHtml()
Returns null if there is no html element yet.
|
HTMLCollection<HTMLImageElement> |
getImages() |
String |
getLastModified() |
HTMLCollection<HTMLElement> |
getLinks()
a-elements with href and area-elements with href, in tree order
|
Location |
getLocation()
Just returns the last location that was set.
|
EventHandler |
getOnreadystatechange()
Not implemented.
|
HTMLCollection<HTMLEmbedElement> |
getPlugins() |
DocumentReadyState |
getReadyState()
Not implemented.
|
String |
getReferrer() |
HTMLCollection<HTMLScriptElement> |
getScripts() |
String |
getTitle()
Gets the text within the first title element within head element, or null.
|
String |
getURL()
Not implemented.
|
boolean |
has(String name)
Has the document got an element with this name?
|
boolean |
hasFocus() |
Node |
insertBefore(Node newChild,
Node refChild)
First adopts the new child, then inserts it.
|
void |
open()
Not implemented.
|
HTMLDocument |
open(String type)
Not implemented.
|
HTMLDocument |
open(String type,
String replace)
Not implemented.
|
WindowProxy |
open(String url,
String name,
String features)
Not implemented.
|
WindowProxy |
open(String url,
String name,
String features,
boolean replace)
Not implemented.
|
boolean |
queryCommandEnabled(String commandId) |
boolean |
queryCommandIndeterm(String commandId) |
boolean |
queryCommandState(String commandId) |
boolean |
queryCommandSupported(String commandId) |
String |
queryCommandValue(String commandId) |
void |
set(String name,
HTMLElement element)
Not in spec.
|
void |
set(String name,
int value)
Not in spec.
|
void |
setBody(HTMLBodyElement newBody) |
void |
setBody(org.w3c.dom.html.HTMLElement body)
Not implemented.
|
void |
setCookie(String c) |
void |
setDesignMode(String mode) |
void |
setDir(String dir) |
void |
setDomain(String d) |
void |
setLastModified(Date d) |
void |
setLocation(String l)
Just sets the location, does not navigate.
|
void |
setOnreadystatechange(EventHandler h)
Not implemented.
|
void |
setReferrer(String url) |
void |
setTitle(String newTitle)
Looks for html/head/title, and sets its text body.
|
String |
toString()
Formats the whole element.
|
void |
write(String... text) |
void |
write(String text)
Not implemented.
|
void |
writeln(String... text) |
void |
writeln(String text)
Not implemented.
|
addEventListener, copyEventListeners, createEvent, createNodeIterator, createNodeIterator, createRange, createTreeWalker, createTreeWalker, dispatchAggregateEvents, dispatchAggregateEvents, dispatchEvent, dispatchEventToSubtree, dispatchingEventToSubtree, getEventListeners, getImplementation, removeEventListener, saveEnclosingAttr, setEventListenersabort, adoptNode, callUserDataHandlers, canRenameElements, changed, changes, checkDOMNSErr, checkNamespaceWF, checkQName, clearIdentifiers, clone, cloneNode, createAttributeNS, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElementDefinition, createEntity, createEntityReference, createNotation, createProcessingInstruction, createTextNode, getAsync, getBaseURI, getDoctype, getDocumentURI, getDomConfig, getEncoding, getErrorChecking, getFeature, getIdentifier, getIdentifiers, getInputEncoding, getNodeName, getNodeNumber, getNodeNumber, getNodeType, getOwnerDocument, getStandalone, getStrictErrorChecking, getTextContent, getUserData, getUserData, getUserDataRecord, getVersion, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, isKidOK, isValidQName, isXMLName, load, loadXML, normalizeDocument, putIdentifier, removeChild, removeIdentifier, renameNode, replaceChild, saveXML, setAsync, setDocumentURI, setEncoding, setErrorChecking, setInputEncoding, setStandalone, setStrictErrorChecking, setTextContent, setUserData, setUserData, setVersion, setXmlEncoding, setXmlStandalone, setXmlVersion, undeferChildrengetChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, isEqualNode, item, normalize, setOwnerDocument, setReadOnly, synchronizeChildrengetNextSibling, getParentNode, getPreviousSiblingaddEventListener, compareDocumentPosition, compareTreePosition, dispatchEvent, getAttributes, getContainer, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getUserData, getUserData, getUserDataRecord, hasAttributes, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setPrefix, setUserData, setUserData, synchronizeDataequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadoptNode, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentURI, getDomConfig, getImplementation, getInputEncoding, getStrictErrorChecking, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, normalizeDocument, renameNode, setDocumentURI, setStrictErrorChecking, setXmlStandalone, setXmlVersioncompareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected HTMLDocumentImp()
public Node insertBefore(Node newChild, Node refChild) throws DOMException
insertBefore in interface NodeinsertBefore in class org.apache.xerces.dom.CoreDocumentImplnewChild - the new childrefChild - If null, inserts at end.DOMExceptionNodeImpl.appendChild(org.w3c.dom.Node)public Node appendChild(Node newChild) throws DOMException
appendChild in interface NodeappendChild in class org.apache.xerces.dom.NodeImplnewChild - the new childDOMExceptionNodeImpl.appendChild(org.w3c.dom.Node)public HTMLHtmlElement getDocumentElement()
getDocumentElement in interface DocumentgetDocumentElement in class org.apache.xerces.dom.CoreDocumentImplpublic HTMLHtmlElement getHtml()
public HTMLHeadElement getHead()
public String getTitle()
getTitle in interface org.w3c.dom.html.HTMLDocumentpublic void setTitle(String newTitle)
setTitle in interface org.w3c.dom.html.HTMLDocumentpublic HTMLBodyElement getBody()
getBody in interface org.w3c.dom.html.HTMLDocumentpublic void setBody(HTMLBodyElement newBody)
public HTMLCollection<HTMLImageElement> getImages()
getImages in interface org.w3c.dom.html.HTMLDocumentpublic HTMLCollection<HTMLElement> getLinks()
getLinks in interface org.w3c.dom.html.HTMLDocumentpublic HTMLCollection<HTMLFormElement> getForms()
getForms in interface org.w3c.dom.html.HTMLDocumentpublic Attr createAttribute(String name) throws DOMException
createAttribute in interface DocumentcreateAttribute in class org.apache.xerces.dom.CoreDocumentImplDOMExceptionpublic Element createElementNS(String namespaceURI, String qualifiedName, String localpart) throws DOMException
createElementNS in class org.apache.xerces.dom.CoreDocumentImplDOMExceptionpublic Element createElementNS(String namespaceURI, String qualifiedName)
createElementNS in interface DocumentcreateElementNS in class org.apache.xerces.dom.CoreDocumentImplnamespaceURI - The HTML parser calls with "http://www.w3.org/1999/xhtml" but that's not what we want.qualifiedName - Like "html"public HTMLElement createElement(String tag) throws DOMException
createElement in interface DocumentcreateElement in class org.apache.xerces.dom.CoreDocumentImplDOMExceptionpublic <T extends HTMLElement> T createElement(Class<T> c)
T - A subinterface of HTMLElement that represents one html elementc - The class objectNotImplementedException - Not (yet) implemented for this interface.public String toString()
toString in class org.apache.xerces.dom.NodeImplpublic HTMLElement getElementById(String id)
getElementById in interface DocumentgetElementById in class org.apache.xerces.dom.CoreDocumentImplpublic HTMLElement getElementByTagName(String tag)
tag - the tagpublic final NodeList getElementsByTagName(String tag)
getElementsByTagName in interface DocumentgetElementsByTagName in class org.apache.xerces.dom.CoreDocumentImpltag - Will be treated as lower-case.public final NodeList getElementsByTagNameNS(String namespace, String key)
getElementsByTagNameNS in interface DocumentgetElementsByTagNameNS in class org.apache.xerces.dom.CoreDocumentImplkey - will be converted to lower-casepublic HTMLDocumentImp cloneNode(boolean deep)
protected void copy(HTMLDocumentImp from, boolean deep)
from - the source documentdeep - whether to copy descendants toopublic Location getLocation()
public void setLocation(String l)
l - the locationpublic String getLastModified()
public void setLastModified(Date d)
public String getDir()
public void setDir(String dir)
public HTMLCollection<HTMLEmbedElement> getEmbeds()
public HTMLCollection<HTMLEmbedElement> getPlugins()
public HTMLCollection<HTMLScriptElement> getScripts()
public void setDomain(String d)
public String getDomain()
getDomain in interface org.w3c.dom.html.HTMLDocumentpublic DocumentReadyState getReadyState()
public String getReferrer()
getReferrer in interface org.w3c.dom.html.HTMLDocumentpublic void setReferrer(String url)
public String getCookie()
getCookie in interface org.w3c.dom.html.HTMLDocumentpublic void setCookie(String c)
setCookie in interface org.w3c.dom.html.HTMLDocumentpublic HTMLElement get(String name)
get in interface ScriptMap<HTMLElement>name - Name of the propertypublic boolean has(String name)
has in interface ScriptMap<HTMLElement>name - Name of the propertypublic void set(String name, HTMLElement element)
set in interface ScriptMap<HTMLElement>name - Name of the propertyelement - Value of the propertypublic void set(String name, int value)
set in interface ScriptMap<HTMLElement>public void deleter(String name)
deleter in interface ScriptMap<HTMLElement>name - Name of the propertypublic HTMLDocument open(String type)
HTMLDocumenttype - "text/html"public HTMLDocument open(String type, String replace)
HTMLDocumenttype - "text/html"replace - the string to replace withpublic WindowProxy open(String url, String name, String features)
HTMLDocumenturl - the URLname - the namefeatures - the featurespublic WindowProxy open(String url, String name, String features, boolean replace)
HTMLDocumenturl - the urlname - the namefeatures - the featuresreplace - whether to replacepublic void write(String... text)
public void writeln(String... text)
public void close()
close in interface org.w3c.dom.html.HTMLDocumentpublic WindowProxy getDefaultView()
public Element getActiveElement()
public boolean hasFocus()
public String getDesignMode()
public void setDesignMode(String mode)
public boolean execCommand(String commandId)
public boolean execCommand(String commandId, boolean showId)
public boolean queryCommandEnabled(String commandId)
public boolean queryCommandIndeterm(String commandId)
public boolean queryCommandState(String commandId)
public boolean queryCommandSupported(String commandId)
public String getURL()
getURL in interface org.w3c.dom.html.HTMLDocumentpublic void setBody(org.w3c.dom.html.HTMLElement body)
setBody 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 getAnchors()
getAnchors in interface org.w3c.dom.html.HTMLDocumentpublic void open()
open 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 HTMLCollection<HTMLElement> getElementsByName(String name)
getElementsByName in interface org.w3c.dom.html.HTMLDocumentpublic EventHandler getOnreadystatechange()
public void setOnreadystatechange(EventHandler h)
Copyright © 2017. All rights reserved.