Java Reference
In-Depth Information
The following objects are listed in alphabetical order. The
CDATASection
,
Comment
,
DocumentType
,
Entity
,
EntityReference
,
Notation
, and
ProcessingInstruction
objects are purposefully
omitted from this section.
Attr
The
Attr
object represents an
Element
object's attribute. Even though
Attr
objects inherit from
Node
,
they are not considered children of the element they describe, and thus are not part of the DOM tree.
The
Node
properties of
parentNode
,
previousSibling
, and
nextSibling
return
null
for
Attr
objects.
Properties
prOperty NaMe
DesCrIptION
INtrODuCeD
Returns the
Element
object the attribute is attached to.
Level 2
ownerElement
Returns the name of the attribute.
Level 1
name
Returns the value of the attribute.
Level 1
value
Document
The
Document
object represents the entire HTML or XML document. It is the root of the document
tree. The
Document
is the container for all nodes within the document, and each
Node
object's
ownerDocument
property points to the
Document
.
Properties
prOperty NaMe
DesCrIptION
INtrODuCeD
The
DocType
object associated with this document.
Returns
null
for HTML and XML documents without
a document type declaration.
Level 1
docType
Returns the root element of the document. For HTML
documents, the
documentElement
is the
<html/>
element.
Level 1
documentElement
The
DOMImplementation
object associated with the
Document
.
Level 1
implementation
Methods
MethOD NaMe
DesCrIptION
INtrODuCeD
Returns a new
Attr
object with
the specified name.
Level 1
createAttribute(name)
createAttributeNS(namespaceURI,
qualifiedName)
Returns an attribute with the given
qualified name and namespace
URI. Not for HTML DOMs.
Level 2
continues