public class Document extends AbstractGroup implements Document
Element,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
protected class |
Document.ChildArray |
AbstractGroup.ElementMap_childrenATTRIBUTE_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_NODEFIND_BY_PREFIX, FIND_BY_REGEX, FIND_BY_TAGNAME, FIND_IGNORE_CASE, FIND_RECURSIVE| Constructor and Description |
|---|
Document()
Constructor.
|
Document(Element root)
Constructor.
|
Document(Element root,
DocType dt)
Constructor.
|
anyElement, appendChild, clone, coalesce, detachChildren, getChildNodes, getChildren, getElement, getElement, getElementIndex, getElementIndex, getElementNames, getElements, getElements, getElements, getElementValue, getElementValue, getFirstChild, getLastChild, hasChildNodes, insertBefore, removeChild, replaceChildcloneNode, compareDocumentPosition, detach, equals, getAttributes, getBaseURI, getDocument, getFeature, getLocalName, getLocator, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getText, getTextContent, getUserData, hasAttributes, hashCode, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, match, normalize, setLocator, setName, setNodeValue, setParent, setPrefix, setText, setTextContent, setUserDatafinalize, getClass, notify, notifyAll, wait, wait, waitappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDatadetach, getDocument, getLocator, getParent, getText, setLocator, setName, setParent, setTextpublic Document(Element root)
public Document()
public final Element getRootElement()
public final void setRootElement(Element root)
public final DocType getDocType()
public final void setDocType(DocType docType)
protected final List<Item> newChildren()
AbstractGroupThe default implementation obeys the semantic of Element, i.e., it doen't allow any child that cannot be a child of Element.
For performance issue, we introduced a map to improve the search speed for Element node associated with a tag name.
newChildren in class AbstractGrouppublic final String getName()
ItemgetName in interface ItemNamespaceable.getTagName()public final short getNodeType()
getNodeType in interface Nodepublic final DocumentType getDoctype()
getDoctype in interface Documentpublic final Element getDocumentElement()
getDocumentElement in interface Documentpublic final DOMImplementation getImplementation()
getImplementation in interface Documentpublic final Element createElement(String lname)
createElement in interface Documentpublic final Element createElementNS(String nsURI, String tname)
createElementNS in interface Documentpublic final Attr createAttribute(String lname)
createAttribute in interface Documentpublic final Attr createAttributeNS(String nsURI, String tname)
createAttributeNS in interface Documentpublic final DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic final Text createTextNode(String data)
createTextNode in interface Documentpublic final Comment createComment(String data)
createComment in interface Documentpublic final CDATASection createCDATASection(String data)
createCDATASection in interface Documentpublic final ProcessingInstruction createProcessingInstruction(String target, String data)
createProcessingInstruction in interface Documentpublic final EntityReference createEntityReference(String name)
createEntityReference in interface Documentpublic final NodeList getElementsByTagName(String tname)
Unlike other implementations (Xerces or Crimson), the returned list is a snapshot of the current tree -- not a "live" representation.
getElementsByTagName in interface Documentpublic final NodeList getElementsByTagNameNS(String nsURI, String lname)
Unlike other implementations (Xerces or Crimson), the returned list is a snapshot of the current tree -- not a "live" representation.
getElementsByTagNameNS in interface Documentpublic final Element getElementById(String elementId)
getElementById in interface Documentpublic final Node importNode(Node importedNode, boolean deep)
importNode in interface Documentpublic String getInputEncoding()
getInputEncoding in interface Documentpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Documentpublic void setXmlStandalone(boolean xmlStandalone)
throws DOMException
setXmlStandalone in interface DocumentDOMExceptionpublic String getXmlVersion()
getXmlVersion in interface Documentpublic void setXmlVersion(String xmlVersion) throws DOMException
setXmlVersion in interface DocumentDOMExceptionpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface Documentpublic String getDocumentURI()
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Documentpublic Node adoptNode(Node source) throws DOMException
adoptNode in interface DocumentDOMExceptionpublic DOMConfiguration getDomConfig()
getDomConfig in interface Documentpublic void normalizeDocument()
normalizeDocument in interface Documentpublic Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
renameNode in interface DocumentDOMExceptionCopyright © 2018. All rights reserved.