|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.tidy.DOMNodeImpl | +--org.w3c.tidy.DOMDocumentImpl
DOMDocumentImpl (c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.java for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000
Field Summary |
Fields inherited from class org.w3c.tidy.DOMNodeImpl |
adaptee |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
protected |
DOMDocumentImpl(Node adaptee)
|
Method Summary | |
Node |
adoptNode(Node source)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
Attr |
createAttribute(java.lang.String name)
Creates an Attr of the given name. |
Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
DOM2 - not implemented. |
CDATASection |
createCDATASection(java.lang.String data)
Creates a CDATASection node whose value is the specified
string. |
Comment |
createComment(java.lang.String data)
Creates a Comment node given the specified string. |
DocumentFragment |
createDocumentFragment()
Creates an empty DocumentFragment object. |
Element |
createElement(java.lang.String tagName)
Creates an element of the type specified. |
Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
DOM2 - not implemented. |
EntityReference |
createEntityReference(java.lang.String name)
Creates an EntityReference object. |
ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
Creates a ProcessingInstruction node given the specified
name and data strings. |
Text |
createTextNode(java.lang.String data)
Creates a Text node given the specified string. |
DocumentType |
getDoctype()
The Document Type Declaration (see DocumentType )
associated with this document. |
Element |
getDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the root element of the document. |
Element |
getElementById(java.lang.String elementId)
DOM2 - not implemented. |
NodeList |
getElementsByTagName(java.lang.String tagname)
Returns a NodeList of all the Elements with a
given tag name in the order in which they are encountered in a
preorder traversal of the Document tree. |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM2 - not implemented. |
java.lang.String |
getEncoding()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
DOMImplementation |
getImplementation()
The DOMImplementation object that handles this document. |
java.lang.String |
getNodeName()
The name of this node, depending on its type; see the table above. |
short |
getNodeType()
A code representing the type of the underlying object, as defined above. |
boolean |
getStandalone()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
boolean |
getStrictErrorChecking()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
java.lang.String |
getVersion()
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
Node |
importNode(Node importedNode,
boolean deep)
DOM2 - not implemented. |
void |
setEncoding(java.lang.String encoding)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
void |
setStandalone(boolean standalone)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
void |
setStrictErrorChecking(boolean strictErrorChecking)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
void |
setTagTable(TagTable tt)
|
void |
setVersion(java.lang.String version)
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.. |
Methods inherited from class org.w3c.tidy.DOMNodeImpl |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, supports |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Constructor Detail |
protected DOMDocumentImpl(Node adaptee)
Method Detail |
public void setTagTable(TagTable tt)
public java.lang.String getNodeName()
Node
getNodeName
in interface Node
getNodeName
in class DOMNodeImpl
Node.getNodeName()
public short getNodeType()
Node
getNodeType
in interface Node
getNodeType
in class DOMNodeImpl
Node.getNodeType()
public DocumentType getDoctype()
Document
DocumentType
)
associated with this document. For HTML documents as well as XML
documents without a document type declaration this returns
null
. The DOM Level 2 does not support editing the
Document Type Declaration. docType
cannot be altered in
any way, including through the use of methods inherited from the
Node
interface, such as insertNode
or
removeNode
.
getDoctype
in interface Document
Document.getDoctype()
public DOMImplementation getImplementation()
Document
DOMImplementation
object that handles this document. A
DOM application may use objects from multiple implementations.
getImplementation
in interface Document
Document.getImplementation()
public Element getDocumentElement()
Document
getDocumentElement
in interface Document
Document.getDocumentElement()
public Element createElement(java.lang.String tagName) throws DOMException
Document
Element
interface, so attributes
can be specified directly on the returned object.
Attr
nodes representing them are automatically created
and attached to the element.
createElementNS
method.
createElement
in interface Document
Element
object with the
nodeName
attribute set to tagName
, and
localName
, prefix
, and
namespaceURI
set to null
.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.Document.createElement(java.lang.String)
public DocumentFragment createDocumentFragment()
Document
DocumentFragment
object.
createDocumentFragment
in interface Document
DocumentFragment
.Document.createDocumentFragment()
public Text createTextNode(java.lang.String data)
Document
Text
node given the specified string.
createTextNode
in interface Document
Text
object.Document.createTextNode(java.lang.String)
public Comment createComment(java.lang.String data)
Document
Comment
node given the specified string.
createComment
in interface Document
Comment
object.Document.createComment(java.lang.String)
public CDATASection createCDATASection(java.lang.String data) throws DOMException
Document
CDATASection
node whose value is the specified
string.
createCDATASection
in interface Document
CDATASection
object.
DOMException
- NOT_SUPPORTED_ERR: Raised if this document is an HTML document.Document.createCDATASection(java.lang.String)
public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws DOMException
Document
ProcessingInstruction
node given the specified
name and data strings.
createProcessingInstruction
in interface Document
ProcessingInstruction
object.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified target contains an
illegal character.
Document.createProcessingInstruction(java.lang.String, java.lang.String)
public Attr createAttribute(java.lang.String name) throws DOMException
Document
Attr
of the given name. Note that the
Attr
instance can then be set on an Element
using the setAttributeNode
method.
createAttributeNS
method.
createAttribute
in interface Document
Attr
object with the nodeName
attribute set to name
, and localName
,
prefix
, and namespaceURI
set to
null
. The value of the attribute is the empty string.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.Document.createAttribute(java.lang.String)
public EntityReference createEntityReference(java.lang.String name) throws DOMException
Document
EntityReference
object. In addition, if the
referenced entity is known, the child list of the
EntityReference
node is made the same as that of the
corresponding Entity
node.If any descendant of the
Entity
node has an unbound namespace prefix, the
corresponding descendant of the created EntityReference
node is also unbound; (its namespaceURI
is
null
). The DOM Level 2 does not support any mechanism to
resolve namespace prefixes.
createEntityReference
in interface Document
EntityReference
object.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
illegal character.
Document.createEntityReference(java.lang.String)
public NodeList getElementsByTagName(java.lang.String tagname)
Document
NodeList
of all the Elements
with a
given tag name in the order in which they are encountered in a
preorder traversal of the Document
tree.
getElementsByTagName
in interface Document
NodeList
object containing all the matched
Elements
.Document.getElementsByTagName(java.lang.String)
public Node importNode(Node importedNode, boolean deep) throws DOMException
importNode
in interface Document
Document
.
DOMException
public Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
createAttributeNS
in interface Document
Attr
object with the following attributes:
AttributeValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted from
qualifiedName
, or null
if there is no
prefixNode.localName
local name, extracted from
qualifiedName
Attr.name
qualifiedName
Node.nodeValue
the empty
string
DOMException
public Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
createElementNS
in interface Document
Element
object with the following
attributes:AttributeValueNode.nodeName
qualifiedName
Node.namespaceURI
namespaceURI
Node.prefix
prefix, extracted
from qualifiedName
, or null
if there is
no prefixNode.localName
local name, extracted from
qualifiedName
Element.tagName
qualifiedName
DOMException
public NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
getElementsByTagNameNS
in interface Document
NodeList
object containing all the matched
Elements
.public Element getElementById(java.lang.String elementId)
getElementById
in interface Document
public java.lang.String getEncoding()
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the encoding
of this document. This is null
when unspecified.
getEncoding
in interface Document
public void setEncoding(java.lang.String encoding)
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the encoding
of this document. This is null
when unspecified.
setEncoding
in interface Document
public java.lang.String getVersion()
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the version
number of this document. This is null
when unspecified.
getVersion
in interface Document
public void setVersion(java.lang.String version)
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, the version
number of this document. This is null
when unspecified.
setVersion
in interface Document
public boolean getStandalone()
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, whether this document is standalone.
getStandalone
in interface Document
public void setStandalone(boolean standalone)
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying, as part of the XML declaration, whether this document is standalone.
setStandalone
in interface Document
public boolean getStrictErrorChecking()
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying whether errors checking is enforced or not.
When set to false
, the implementation is free to not
test every possible error case normally defined on DOM operations,
and not raise any DOMException
. In case of error, the
behavior is undefined. This attribute is true
by
defaults.
getStrictErrorChecking
in interface Document
public void setStrictErrorChecking(boolean strictErrorChecking)
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
An attribute specifying whether errors checking is enforced or not.
When set to false
, the implementation is free to not
test every possible error case normally defined on DOM operations,
and not raise any DOMException
. In case of error, the
behavior is undefined. This attribute is true
by
defaults.
setStrictErrorChecking
in interface Document
public Node adoptNode(Node source) throws DOMException
Document
EXPERIMENTAL! Based on the Document Object Model (DOM) Level 3 Core Working Draft of 5 June 2001..
Changes the ownerDocument
of a node, its children, as well
as the attached attribute nodes if there are any. If the node has a
parent it is first removed from its parent child list. This
effectively allows moving a subtree from one document to another. The
following list describes the specifics for each type of node.
ownerElement
attribute is set to
null
and the specified
flag is set to
true
on the adopted Attr
. The descendants
of the source Attr
are recursively adopted.Document
nodes cannot
be adopted.DocumentType
nodes cannot
be adopted.Attr
nodes.
Default attributes are discarded, though if the document being
adopted into defines default attributes for this element name, those
are assigned. The descendants of the source element are recursively
adopted.Entity
nodes cannot be adopted.EntityReference
node
itself is adopted, the descendants are discarded, since the source
and destination documents might have defined the entity differently.
If the document being imported into provides a definition for this
entity name, its value is assigned.Notation
nodes cannot be adopted.
adoptNode
in interface Document
source
- The node to move into this document.
null
if this operation
fails, such as when the source node comes from a different
implementation.
DOMException
- NOT_SUPPORTED_ERR: Raised if the source node is of type
DOCUMENT
, DOCUMENT_TYPE
.
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |