public class DOMDocument extends DefaultDocument implements Document
DOMDocument implements an XML document which supports the W3C
DOM API.
encodingDEFAULT_CONTENT_LIST_SIZENODE_TYPE_NAMESATTRIBUTE_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_NODEANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE| Constructor and Description |
|---|
DOMDocument() |
DOMDocument(DOMDocumentType docType) |
DOMDocument(DOMElement rootElement) |
DOMDocument(DOMElement rootElement,
DOMDocumentType docType) |
DOMDocument(String name) |
DOMDocument(String name,
DOMElement rootElement,
DOMDocumentType docType) |
addDocType, addNode, addNode, clearContent, clone, contentList, getDocType, getEntityResolver, getName, getRootElement, getXMLEncoding, processingInstruction, processingInstructions, processingInstructions, removeNode, removeProcessingInstruction, rootElementAdded, setContent, setDocType, setDocumentFactory, setEntityResolver, setNameaccept, add, addComment, addElement, addElement, addElement, addProcessingInstruction, addProcessingInstruction, asXML, asXPathResult, checkAddElementAllowed, childAdded, childRemoved, getDocument, getNodeType, getPath, getStringValue, getUniquePath, normalize, remove, setRootElement, setXMLEncoding, toString, writeadd, add, add, addElement, appendContent, content, contentRemoved, createContentList, createContentList, createEmptyList, createResultList, createSingleResultList, elementByID, elementID, getContentAsStringValue, getContentAsText, getText, getTextTrim, hasContent, indexOf, invalidNodeTypeAddException, isReadOnly, node, nodeCount, nodeIterator, remove, remove, remove, setProcessingInstructionscreatePattern, createXPath, createXPathFilter, createXPathResult, detach, getNodeTypeName, getParent, getPath, getUniquePath, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOfequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNodeType, normalizeadd, add, add, appendContent, content, elementByID, indexOf, node, nodeCount, nodeIterator, remove, remove, remove, setProcessingInstructionscreateXPath, detach, getNodeTypeName, getParent, getPath, getText, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setParent, setText, supportsParent, valueOfpublic DOMDocument()
public DOMDocument(String name)
public DOMDocument(DOMElement rootElement)
public DOMDocument(DOMDocumentType docType)
public DOMDocument(DOMElement rootElement, DOMDocumentType docType)
public DOMDocument(String name, DOMElement rootElement, DOMDocumentType docType)
public String getNamespaceURI()
public String getPrefix()
public void setPrefix(String prefix) throws DOMException
DOMExceptionpublic String getLocalName()
public String getNodeName()
public String getNodeValue() throws DOMException
DOMExceptionpublic void setNodeValue(String nodeValue) throws DOMException
DOMExceptionpublic Node getParentNode()
public NodeList getChildNodes()
public Node getFirstChild()
public Node getLastChild()
public Node getPreviousSibling()
public Node getNextSibling()
public NamedNodeMap getAttributes()
public Document getOwnerDocument()
public Node insertBefore(Node newChild, Node refChild) throws DOMException
DOMExceptionpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException
DOMExceptionpublic Node removeChild(Node oldChild) throws DOMException
DOMExceptionpublic Node appendChild(Node newChild) throws DOMException
DOMExceptionpublic boolean hasChildNodes()
public Node cloneNode(boolean deep)
public boolean hasAttributes()
public DocumentType getDoctype()
public DOMImplementation getImplementation()
public Element getDocumentElement()
public Element createElement(String name) throws DOMException
DOMExceptionpublic DocumentFragment createDocumentFragment()
public CDATASection createCDATASection(String data) throws DOMException
DOMExceptionpublic ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException
DOMExceptionpublic Attr createAttribute(String name) throws DOMException
DOMExceptionpublic EntityReference createEntityReference(String name) throws DOMException
DOMExceptionpublic Node importNode(Node importedNode, boolean deep) throws DOMException
DOMExceptionpublic Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException
DOMExceptionpublic Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException
DOMExceptionprotected DocumentFactory getDocumentFactory()
getDocumentFactory in class DefaultDocumentpublic String getInputEncoding()
public String getXmlEncoding()
public boolean getXmlStandalone()
public void setXmlStandalone(boolean xmlStandalone)
throws DOMException
DOMExceptionpublic String getXmlVersion()
public void setXmlVersion(String xmlVersion) throws DOMException
DOMExceptionpublic boolean getStrictErrorChecking()
public void setStrictErrorChecking(boolean strictErrorChecking)
public String getDocumentURI()
public void setDocumentURI(String documentURI)
public Node adoptNode(Node source) throws DOMException
DOMExceptionpublic DOMConfiguration getDomConfig()
public void normalizeDocument()
public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException
DOMExceptionpublic String getBaseURI()
public short compareDocumentPosition(Node other) throws DOMException
DOMExceptionpublic String getTextContent() throws DOMException
DOMExceptionpublic void setTextContent(String textContent) throws DOMException
DOMExceptionpublic boolean isSameNode(Node other)
public boolean isDefaultNamespace(String namespaceURI)
public boolean isEqualNode(Node other)
public Object setUserData(String key, Object data, UserDataHandler handler)
Copyright © 2025. All rights reserved.