Java org.w3c.dom Document fields, constructors, methods, implement or subclass

Example usage for Java org.w3c.dom Document fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.w3c.dom Document.

The text is from its open source code.

Implementation

org.w3c.dom.Document has the following implementations.
Click this link to see all its implementation.

Method

NodeadoptNode(Node source)
Attempts to adopt a node from another document to this document.
NodeappendChild(Node newChild)
Adds the node newChild to the end of the list of children of this node.
NodecloneNode(boolean deep)
Returns a duplicate of this node, i.e., serves as a generic copy constructor for nodes.
AttrcreateAttribute(String name)
Creates an Attr of the given name.
AttrcreateAttributeNS(String namespaceURI, String qualifiedName)
Creates an attribute of the given qualified name and namespace URI.
CDATASectioncreateCDATASection(String data)
Creates a CDATASection node whose value is the specified string.
CommentcreateComment(String data)
Creates a Comment node given the specified string.
DocumentFragmentcreateDocumentFragment()
Creates an empty DocumentFragment object.
ElementcreateElement(String tagName)
Creates an element of the type specified.
ElementcreateElementNS(String namespaceURI, String qualifiedName)
Creates an element of the given qualified name and namespace URI.
EntityReferencecreateEntityReference(String name)
Creates an EntityReference object.
ProcessingInstructioncreateProcessingInstruction(String target, String data)
Creates a ProcessingInstruction node given the specified name and data strings.
TextcreateTextNode(String data)
Creates a Text node given the specified string.
booleanequals(Object obj)
Indicates whether some other object is "equal to" this one.
NamedNodeMapgetAttributes()
A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.
StringgetBaseURI()
The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.
NodeListgetChildNodes()
A NodeList that contains all children of this node.
ClassgetClass()
Returns the runtime class of this Object .
DocumentTypegetDoctype()
The Document Type Declaration (see DocumentType) associated with this document.
ElementgetDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the document element of the document.
StringgetDocumentURI()
The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
DOMConfigurationgetDomConfig()
The configuration used when Document.normalizeDocument() is invoked.
ElementgetElementById(String elementId)
Returns the Element that has an ID attribute with the given value.
NodeListgetElementsByTagName(String tagname)
Returns a NodeList of all the Elements in document order with a given tag name and are contained in the document.
NodeListgetElementsByTagNameNS(String namespaceURI, String localName)
Returns a NodeList of all the Elements with a given local name and namespace URI in document order.
ObjectgetFeature(String feature, String version)
This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in .
NodegetFirstChild()
The first child of this node.
DOMImplementationgetImplementation()
The DOMImplementation object that handles this document.
StringgetInputEncoding()
An attribute specifying the encoding used for this document at the time of the parsing.
NodegetLastChild()
The last child of this node.
StringgetNamespaceURI()
The namespace URI of this node, or null if it is unspecified (see ).
shortgetNodeType()
A code representing the type of the underlying object, as defined above.
StringgetNodeValue()
The value of this node, depending on its type; see the table above.
DocumentgetOwnerDocument()
The Document object associated with this node.
NodegetParentNode()
The parent of this node.
StringgetPrefix()
The namespace prefix of this node, or null if it is unspecified.
booleangetStrictErrorChecking()
An attribute specifying whether error checking is enforced or not.
StringgetTextContent()
This attribute returns the text content of this node and its descendants.
ObjectgetUserData(String key)
Retrieves the object associated to a key on a this node.
StringgetXmlEncoding()
An attribute specifying, as part of the XML declaration, the encoding of this document.
booleangetXmlStandalone()
An attribute specifying, as part of the XML declaration, whether this document is standalone.
StringgetXmlVersion()
An attribute specifying, as part of the XML declaration, the version number of this document.
booleanhasChildNodes()
Returns whether this node has any children.
NodeimportNode(Node importedNode, boolean deep)
Imports a node from another document to this document, without altering or removing the source node from the original document; this method creates a new copy of the source node.
NodeinsertBefore(Node newChild, Node refChild)
Inserts the node newChild before the existing child node refChild.
booleanisEqualNode(Node arg)
Tests whether two nodes are equal.
StringlookupNamespaceURI(String prefix)
Look up the namespace URI associated to the given prefix, starting from this node.
StringlookupPrefix(String namespaceURI)
Look up the prefix associated to the given namespace URI, starting from this node.
voidnormalize()
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form where only structure (e.g., elements, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are neither adjacent Text nodes nor empty Text nodes.
voidnormalizeDocument()
This method acts as if the document was going through a save and load cycle, putting the document in a "normal" form.
NoderemoveChild(Node oldChild)
Removes the child node indicated by oldChild from the list of children, and returns it.
NoderenameNode(Node n, String namespaceURI, String qualifiedName)
Rename an existing node of type ELEMENT_NODE or ATTRIBUTE_NODE.
NodereplaceChild(Node newChild, Node oldChild)
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node.
voidsetDocumentURI(String documentURI)
The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
voidsetNodeValue(String nodeValue)
The value of this node, depending on its type; see the table above.
voidsetStrictErrorChecking(boolean strictErrorChecking)
An attribute specifying whether error checking is enforced or not.
ObjectsetUserData(String key, Object data, UserDataHandler handler)
Associate an object to a key on this node.
voidsetXmlStandalone(boolean xmlStandalone)
An attribute specifying, as part of the XML declaration, whether this document is standalone.
voidsetXmlVersion(String xmlVersion)
An attribute specifying, as part of the XML declaration, the version number of this document.
StringtoString()
Returns a string representation of the object.