- Publicity: Public Only All
tdom-procs.tcl
Procedures to make parsing XML using TDOM a little easier
- Location:
- packages/acs-tcl/tcl/tdom-procs.tcl
- Created:
- 2004/10/19
- Author:
- avni@ucla.edu <AK>
- CVS Identification:
$Id: tdom-procs.tcl,v 1.6 2024/09/11 06:15:48 gustafn Exp $
Procedures in this file
- tdom::get_attribute_value (public)
- tdom::get_node_object (public)
- tdom::get_node_xml (public)
- tdom::get_parent_node_object (public)
- tdom::get_tag_value (public)
Detailed information
tdom::get_attribute_value (public)
tdom::get_attribute_value node_object attribute_name [ default_value ]
Returns the value of the attribute specified
- Parameters:
- node_object (required)
- attribute_name (required)
- default_value (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::get_node_object (public)
tdom::get_node_object parent_node_object [ args... ]
Returns a tDOM object to the args given If the tDOM object doesn't exist or the value is null, return null
Example ----------------------------------------------------- XML: <experiment> <experimenter> <first-name>Annabelle Lee</first-name> <last-name>Poe</last-name> </experimenter> </experiment> Params: parent_node_object=$tdom_experiment_object args=experimenter experimenter_two Returns: TDOM object for experimenter node End Example -------------------------------------------------
- Parameters:
- parent_node_object (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::get_node_xml (public)
tdom::get_node_xml node_object
Returns xml of the data pointed to by the node object If tag doesn't exist or the value is null, returns null
- Parameters:
- node_object (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::get_parent_node_object (public)
tdom::get_parent_node_object child_node_object
Returns a tDOM object for the parent node of the child node object passed in
- Parameters:
- child_node_object (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
tdom::get_tag_value (public)
tdom::get_tag_value node_object [ args... ]
Returns the tag value of the tag_name passed in If tag doesn't exist or the value is null, returns null
Example ----------------------------------------------------- XML: <experiment-id>1222</experiment-id> Params: node_object=$document args=experiment-id EXPERIMENT-ID Returns: 1222 End Example -------------------------------------------------
- Parameters:
- node_object (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.