public class DocumentImpl extends CoreDocumentImpl implements DocumentEvent
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.
changes, errorCheckingfirstChild, fNodeListCache, ownerDocumentnextSibling_, previousSibling_DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, FIRSTCHILD, HASSTRING, ID, NORMALIZED, OWNED, ownerNode_, READONLY, SPECIFIED, SYNCCHILDRENATTRIBUTE_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 |
|---|
DocumentImpl()
NON-DOM: Actually creating a Document is outside the DOM's spec, since it has
to operate in terms of a particular implementation.
|
DocumentImpl(DocumentType doctype)
For DOM2 support.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
cloneNode(boolean deep)
Deep-clone a document, including fixing ownerDoc for the cloned children.
|
Event |
createEvent(String type)
Introduced in DOM Level 2.
|
DOMImplementation |
getImplementation()
Retrieve information describing the abilities of this particular DOM
implementation.
|
addEventListener, adoptNode, canRenameElements, changed, changes, checkDOMNSErr, checkNamespaceWF, checkQName, clearIdentifiers, clone, cloneNode, copyEventListeners, createAttribute, createAttributeNS, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElement, createElementNS, createElementNS, createEntity, createEntityReference, createProcessingInstruction, createTextNode, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getErrorChecking, getIdentifier, getInputEncoding, getNodeName, getNodeNumber, getNodeNumber, getNodeType, getOwnerDocument, getStrictErrorChecking, getTextContent, getXmlEncoding, getXmlStandalone, getXmlVersion, importNode, insertBefore, isKidOK, isValidQName, isXMLName, normalizeDocument, putIdentifier, removeChild, removeEventListener, removeIdentifier, renameNode, replaceChild, setDocumentURI, setErrorChecking, setInputEncoding, setStrictErrorChecking, setTextContent, setXmlEncoding, setXmlStandalone, setXmlVersion, undeferChildrengetChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, hasChildNodes, isEqualNode, item, setOwnerDocument, synchronizeChildrengetNextSibling, getParentNode, getPreviousSiblingaddEventListener, appendChild, compareDocumentPosition, dispatchEvent, getAttributes, getFeature, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getUserData, hasAttributes, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, normalize, removeEventListener, setNodeValue, setPrefix, setUserData, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitappendChild, compareDocumentPosition, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, getUserData, hasAttributes, hasChildNodes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, setNodeValue, setPrefix, setUserDatapublic DocumentImpl()
public DocumentImpl(DocumentType doctype)
doctype - the DocumentTypepublic Node cloneNode(boolean deep)
cloneNode in interface NodecloneNode in class CoreDocumentImpldeep - boolean, iff true replicate children
Example: Cloning a Text node will copy both the node and the text it
contains.
Example: Cloning something that has children -- Element or Attr, for
example -- will _not_ clone those children unless a "deep clone" has
been requested. A shallow clone of an Attr node will yield an empty Attr
of the same name.
NOTE: Clones will always be read/write, even if the node being cloned is
read-only, to permit applications using only the DOM API to obtain
editable copies of locked portions of the tree.
public DOMImplementation getImplementation()
getImplementation in interface DocumentgetImplementation in class CoreDocumentImplpublic Event createEvent(String type) throws DOMException
Create and return Event objects.
createEvent in interface DocumentEventtype - The eventType parameter specifies the type of Event interface to
be created. If the Event interface specified is supported by the
implementation this method will return a new Event of the
interface type requested. If the Event is to be dispatched via
the dispatchEvent method the appropriate event init method must
be called after creation in order to initialize the Event's
values. As an example, a user wishing to synthesize some kind of
Event would call createEvent with the parameter "Events". The
initEvent method could then be called on the newly created Event
to set the specific type of Event to be dispatched and set its
context information.DOMException - NOT_SUPPORTED_ERR: Raised if the implementation does
not support the type of Event interface requestedCopyright © 2024 HtmlUnit. All rights reserved.