DOMDocument implements an XML document which supports the W3C
DOM API.
| Modifier and Type | Field and Description |
|---|---|
| private static final DOMDocumentFactory | DOCUMENT_FACTORY
Hides org. DocumentFactory instance used by default
|
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Node | adoptNode(Node
The node to move into this document. source)Implements org. |
| public Node | appendChild(Node
The node to add.If it is a
newChild)DocumentFragment object, the entire contents of the
document fragment are moved into the child list of this nodeImplements org. newChild to the end of the list of children
of this node.
|
| private void | |
| public Node | cloneNode(boolean
If deep)true, recursively clone the subtree under
the specified node; if false, clone only the node
itself (and its attributes, if it is an Element).Implements org. |
| public short | compareDocumentPosition(Node
The node to compare against the reference node. other)Implements org. |
| public Attr | createAttribute(String
The name of the attribute. name)Implements org. Attr of the given name.
|
| public Attr | createAttributeNS(String
The namespace URI of the attribute to create. namespaceURI, String The qualified name of the attribute to
instantiate. qualifiedName)Implements org. |
| public CDATASection | createCDATASection(String
The data for the data)CDATASection contents.Implements org. CDATASection node whose value is the specified
string.
|
| public Comment | createComment(String
The data for the node. data)Implements org. Comment node given the specified string.
|
| public DocumentFragment | createDocumentFragment()
Implements org. DocumentFragment object.
|
| public Element | createElement(String
The name of the element type to instantiate. For XML,
this is case-sensitive, otherwise it depends on the
case-sensitivity of the markup language in use. In that case, the
name is mapped to the canonical form of that markup by the DOM
implementation. name)Implements org. |
| public Element | createElementNS(String
The namespace URI of the element to create. namespaceURI, String The qualified name of the element type to
instantiate. qualifiedName)Implements org. |
| public EntityReference | createEntityReference(String
The name of the entity to reference.Unlike
name)Document.createElementNS or
Document.createAttributeNS, no namespace well-formed
checking is done on the entity name. Applications should invoke
Document.normalizeDocument() with the parameter "
namespaces" set to true in order to ensure that the
entity name is namespace well-formed.Implements org. EntityReference object.
|
| public ProcessingInstruction | createProcessingInstruction(String
The target part of the processing instruction.Unlike
target, String Document.createElementNS or
Document.createAttributeNS, no namespace well-formed
checking is done on the target name. Applications should invoke
Document.normalizeDocument() with the parameter "
namespaces" set to true in order to ensure that the
target name is namespace well-formed.The data for the node. data)Implements org. ProcessingInstruction node given the specified
name and data strings.
|
| public Text | createTextNode(String
The data for the node. data)Implements org. Text node given the specified string.
|
| public NamedNodeMap | getAttributes()
Implements org. NamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise.
|
| public String | getBaseURI()
Implements org. null if the
implementation wasn't able to obtain an absolute URI.
|
| public NodeList | getChildNodes()
Implements org. NodeList that contains all children of this node.
|
| public DocumentType | getDoctype()
Implements org. DocumentType)
associated with this document.
|
| public Element | getDocumentElement()
Implements org. |
| protected DocumentFactory | |
| public String | getDocumentURI()
Implements org. null if undefined or if
the Document was created using
DOMImplementation.createDocument.
|
| public DOMConfiguration | getDomConfig()
Implements org. Document.normalizeDocument()
is invoked.
|
| public Element | getElementById(String
The unique elementId)id value for an element.Implements org. Element that has an ID attribute with the
given value.
|
| public NodeList | getElementsByTagName(String
The name of the tag to match on. The special value "*"
matches all tags. For XML, the name)tagname parameter is
case-sensitive, otherwise it depends on the case-sensitivity of the
markup language in use.Implements org. NodeList of all the Elements in
document order with a given tag name and are contained in the
document.
|
| public NodeList | getElementsByTagNameNS(String
The namespace URI of the elements to match on. The
special value namespace, String "*" matches all namespaces.The local name of the elements to match on. The
special value "*" matches all local names. name)Implements org. NodeList of all the Elements with a
given local name and namespace URI in document order.
|
| public Object | getFeature(String
The name of the feature requested. Note that any plus
sign "+" prepended to the name of the feature will be ignored since
it is not significant in the context of this method. feature, String This is the version number of the feature to test. version)Implements org. |
| public Node | |
| public DOMImplementation | getImplementation()
Implements org. DOMImplementation object that handles this document.
|
| public String | getInputEncoding()
Implements org. |
| public Node | |
| public String | getLocalName()
Implements org. |
| public String | getNamespaceURI()
Implements org. null if it is
unspecified (see ).
|
| public Node | getNextSibling()
Implements org. |
| public String | getNodeName()
Implements org. |
| public String | getNodeValue()
Implements org. |
| public Document | getOwnerDocument()
Implements org. Document object associated with this node.
|
| public Node | |
| public String | getPrefix()
Implements org. null if it is
unspecified.
|
| public Node | getPreviousSibling()
Implements org. |
| public boolean | getStrictErrorChecking()
Implements org. |
| public String | getTextContent()
Implements org. |
| public Object | getUserData(String
The key the object is associated to. key)Implements org. |
| public String | getXmlEncoding()
Implements org. |
| public boolean | getXmlStandalone()
Implements org. |
| public String | getXmlVersion()
Implements org. |
| public boolean | hasAttributes()
Implements org. |
| public boolean | hasChildNodes()
Implements org. |
| public Node | importNode(Node
The node to import. importedNode, boolean If deep)true, recursively import the subtree under
the specified node; if false, import only the node
itself, as explained above. This has no effect on nodes that cannot
have any children, and on Attr, and
EntityReference nodes.Implements org. |
| private void | |
| public Node | insertBefore(Node
The node to insert. newChild, Node The reference node, i.e., the node before which the
new node must be inserted. refChild)Implements org. newChild before the existing child node
refChild.
|
| public boolean | isDefaultNamespace(String
The namespace URI to look for. namespaceURI)Implements org. namespaceURI is the
default namespace or not.
|
| public boolean | isEqualNode(Node
The node to compare equality with. other)Implements org. |
| public boolean | isSameNode(Node
The node to test against. other)Implements org. |
| public boolean | isSupported(String
The name of the feature to test. feature, String This is the version number of the feature to test. version)Implements org. |
| public String | lookupNamespaceURI(String
The prefix to look for. If this parameter is
prefix)null, the method will return the default namespace URI
if any.Implements org. |
| public String | lookupPrefix(String
The namespace URI to look for. namespaceURI)Implements org. |
| public void | normalizeDocument()
Implements org. |
| public Node | removeChild(Node
The node being removed. oldChild)Implements org. oldChild from the list
of children, and returns it.
|
| public Node | renameNode(Node
The node to rename. n, String The new namespace URI. namespaceURI, String The new qualified name. qualifiedName)Implements org. ELEMENT_NODE or
ATTRIBUTE_NODE.
|
| public Node | replaceChild(Node
The new node to put in the child list. newChild, Node The node being replaced in the list. oldChild)Implements org. oldChild with newChild
in the list of children, and returns the oldChild node.
|
| public void | setDocumentURI(String documentURI)
Implements org. null if undefined or if
the Document was created using
DOMImplementation.createDocument.
|
| public void | setNodeValue(String nodeValue)
Implements org. |
| public void | setPrefix(String prefix)
Implements org. null if it is
unspecified.
|
| public void | setStrictErrorChecking(boolean strictErrorChecking)
Implements org. |
| public void | setTextContent(String textContent)
Implements org. |
| public Object | setUserData(String
The key to associate the object to. key, Object The object to associate to the given key, or
data, UserDataHandler null to remove any existing association to that key.The handler to associate to that key, or
handler)null.Implements org. |
| public void | setXmlStandalone(boolean xmlStandalone)
Implements org. |
| public void | setXmlVersion(String xmlVersion)
Implements org. |
| public boolean |