NAME
domDoc
- Manipulates an instance of a DOM document object
SYNOPSIS
$documentObject method ?arg arg ...?
DESCRIPTION
This command manipulates one particular instance of a document object.
method indicates a specific method of the document class. These
methods should closely conform to the W3C recommendation
"Document Object Model (Core) Level 1"
(http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html).
Look at these documents for a deeper understanding of the functionality.
The valid methods are:
-
documentElement ?objVar?
-
Returns the top most element in the document (the root element).
-
getElementsByTagName name
-
Returns a list of all elements in the document matching (glob style)
name.
-
createElement tagName ?objVar?
-
Creates (allocates) a new element node with node name
tagName, append it to the hidden fragment
list in the document object and returns the node object.
If objVar is given the new node object store
in this variable.
-
createTextNode text ?objVar?
-
Creates (allocates) a new text node with node value
text, appends it to the hidden fragment
list in the document object and returns the node object.
If objVar is given, the new node object is stored
in this variable.
-
createComment text ?objVar?
-
Creates (allocates) a new comment node with value
text, appends it to the hidden fragment
list in the document object and returns the node object.
If objVar is given, the new comment node object
is stored in this variable.
-
createCDATASection data ?objVar?
-
Creates (allocates) a new CDATA node with node value
data, appends it to the hidden fragment
list in the document object and returns the node object.
If objVar is given, the new node object is stored
in this variable.
-
createProcessingInstruction target data ?objVar?
-
Creates a process instruction, appends it to the hidden fragment
list in the document object and returns the node object.
If objVar is given, the new node object is stored
in this variable.
-
delete
-
Explicitly deletes the document, including the associated
Tcl object commands (for nodes, fragment/new nodes, the
document object itself) and the underlying DOM tree.
Otherwise, if an unknown method name is given, the command with the same
name as the given metho within the namespace ::dom::domDoc
is tried to be executed. This allows quick method additions on Tcl level.
Newly created nodes are appended to a hidden fragment list. If there
are not moved into the tree they are automaticaly deleted, when the
whole document gets deleted.
PORTABILITY ISSUES
SEE ALSO
dom, domNode