- Publicity: Public Only All
30-xml-utils-procs.tcl
This set of utilities was created back in the days when ns_xml was the preferred AOLserver XML api. It came in handy to have such an abstraction when the project switched to the tDOM library, so it stayed around, even if now is composed mostly by trivial one-liners. It is not clear whether it would make more sense to use tDOM directly and avoid this extra layer altogether in the future. Notable places where this library is in use are the APM and xml-rpc package (which also provides some automated tests for it).
- Location:
- packages/acs-tcl/tcl/30-xml-utils-procs.tcl
Procedures in this file
- xml_doc_free (public)
- xml_doc_get_first_node (public)
- xml_doc_render (public)
- xml_node_get_attribute (public)
- xml_node_get_children (public)
- xml_node_get_children_by_name (public)
- xml_node_get_children_by_select (public)
- xml_node_get_content (public)
- xml_node_get_first_child (public)
- xml_node_get_first_child_by_name (public)
- xml_node_get_name (public)
- xml_node_get_type (public)
- xml_node_set_attribute (public)
- xml_parse (public)
- xml_support_ok (public)
Detailed information
xml_doc_free (public)
xml_doc_free doc_id
Free the doc
- Parameters:
- doc_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xml_rpc_fault, xml_rpc_respond
xml_doc_get_first_node (public)
xml_doc_get_first_node doc_id
Get first node
- Parameters:
- doc_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xml_get_child_node_content_by_path, xml_rpc_fault, xml_rpc_respond
xml_doc_render (public)
xml_doc_render doc_id [ indent_p ]
Render the doc
- Parameters:
- doc_id (required)
- indent_p (optional, defaults to
"f"
)- Returns:
- XML
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_attribute (public)
xml_node_get_attribute node_id attribute_name [ default ]
Get Node Attribute
- Parameters:
- node_id (required)
- attribute_name (required)
- default (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_children (public)
xml_node_get_children parent_node
Get children nodes
- Parameters:
- parent_node (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_children_by_name (public)
xml_node_get_children_by_name parent_node name
Find nodes of a parent that have a given name
- Parameters:
- parent_node (required)
- name (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_children_by_select (public)
xml_node_get_children_by_select parent_node xpath
Get children of given node that match supplied XPATH query
- Parameters:
- parent_node (required)
- xpath (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_content (public)
xml_node_get_content node_id
Get Content
- Parameters:
- node_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_first_child (public)
xml_node_get_first_child parent_node
Returns the first child node
- Parameters:
- parent_node (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xml_rpc_fault, xml_rpc_respond
xml_node_get_first_child_by_name (public)
xml_node_get_first_child_by_name parent_node name
Returns the first child node that has a given name
- Parameters:
- parent_node (required)
- name (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_name (public)
xml_node_get_name node_id
Get Node Name
- Parameters:
- node_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_get_type (public)
xml_node_get_type node_id
Get Node Type
- Parameters:
- node_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_node_set_attribute (public)
xml_node_set_attribute node_id attribute_name value
Set Node Attribute
- Parameters:
- node_id (required)
- attribute_name (required)
- value (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
xml_parse (public)
xml_parse [ -persist ] xml
Parse a document and return a doc_id
- Switches:
- -persist (optional, boolean)
- decides whether returned document object will be deleted when the connection is closed or will be kept in server memory
- Parameters:
- xml (required)
- Returns:
- parsed document object handle
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xml_get_child_node_content_by_path, files__check_xql_files, xml_rpc_fault, xml_rpc_decode_value, xml_rpc_respond
xml_support_ok (public)
xml_support_ok varname
The proc that checks that XML support is complete
- Parameters:
- varname (required)
- Returns:
- boolean
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.