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

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):
%3 test_xml_rpc_fault xml_rpc_fault (test xml-rpc) xml_doc_free xml_doc_free test_xml_rpc_fault->xml_doc_free test_xml_rpc_respond xml_rpc_respond (test xml-rpc) test_xml_rpc_respond->xml_doc_free apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->xml_doc_free db_qd_internal_parse_one_query db_qd_internal_parse_one_query (private) db_qd_internal_parse_one_query->xml_doc_free xmlrpc::fault xmlrpc::fault (private) xmlrpc::fault->xml_doc_free xmlrpc::invoke xmlrpc::invoke (private) xmlrpc::invoke->xml_doc_free xmlrpc::parse_response xmlrpc::parse_response (private) xmlrpc::parse_response->xml_doc_free

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):
%3 test_xml_get_child_node_content_by_path xml_get_child_node_content_by_path (test acs-tcl) xml_doc_get_first_node xml_doc_get_first_node test_xml_get_child_node_content_by_path->xml_doc_get_first_node test_xml_rpc_fault xml_rpc_fault (test xml-rpc) test_xml_rpc_fault->xml_doc_get_first_node test_xml_rpc_respond xml_rpc_respond (test xml-rpc) test_xml_rpc_respond->xml_doc_get_first_node aa_test::parse_install_file aa_test::parse_install_file (public) aa_test::parse_install_file->xml_doc_get_first_node aa_test::parse_test_file aa_test::parse_test_file (public) aa_test::parse_test_file->xml_doc_get_first_node apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->xml_doc_get_first_node apm_load_install_xml apm_load_install_xml (private) apm_load_install_xml->xml_doc_get_first_node apm_load_install_xml_file apm_load_install_xml_file (private) apm_load_install_xml_file->xml_doc_get_first_node

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):
%3 xmlrpc::fault xmlrpc::fault (private) xml_doc_render xml_doc_render xmlrpc::fault->xml_doc_render xmlrpc::remote_call xmlrpc::remote_call (public) xmlrpc::remote_call->xml_doc_render xmlrpc::respond xmlrpc::respond (private) xmlrpc::respond->xml_doc_render

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):
%3 aa_test::parse_install_file aa_test::parse_install_file (public) xml_node_get_attribute xml_node_get_attribute aa_test::parse_install_file->xml_node_get_attribute aa_test::parse_test_file aa_test::parse_test_file (public) aa_test::parse_test_file->xml_node_get_attribute apm_attribute_value apm_attribute_value (public) apm_attribute_value->xml_node_get_attribute apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->xml_node_get_attribute auth::sync::process_doc::ims::ProcessDocument auth::sync::process_doc::ims::ProcessDocument (private) auth::sync::process_doc::ims::ProcessDocument->xml_node_get_attribute

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):
%3 aa_test::parse_install_file aa_test::parse_install_file (public) xml_node_get_children xml_node_get_children aa_test::parse_install_file->xml_node_get_children apm::process_install_xml apm::process_install_xml (public) apm::process_install_xml->xml_node_get_children apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->xml_node_get_children install::xml::action::add-subsite-admin install::xml::action::add-subsite-admin (public) install::xml::action::add-subsite-admin->xml_node_get_children install::xml::action::add-subsite-member install::xml::action::add-subsite-member (public) install::xml::action::add-subsite-member->xml_node_get_children

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):
%3 aa_test::parse_test_file aa_test::parse_test_file (public) xml_node_get_children_by_name xml_node_get_children_by_name aa_test::parse_test_file->xml_node_get_children_by_name apm::process_install_xml apm::process_install_xml (public) apm::process_install_xml->xml_node_get_children_by_name apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->xml_node_get_children_by_name apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->xml_node_get_children_by_name auth::sync::process_doc::ims::ProcessDocument auth::sync::process_doc::ims::ProcessDocument (private) auth::sync::process_doc::ims::ProcessDocument->xml_node_get_children_by_name

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):
%3

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):
%3 aa_test::parse_install_file aa_test::parse_install_file (public) xml_node_get_content xml_node_get_content aa_test::parse_install_file->xml_node_get_content aa_test::parse_test_file aa_test::parse_test_file (public) aa_test::parse_test_file->xml_node_get_content apm::package_version::attributes::parse_xml apm::package_version::attributes::parse_xml (private) apm::package_version::attributes::parse_xml->xml_node_get_content apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->xml_node_get_content apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->xml_node_get_content

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):
%3 test_xml_rpc_fault xml_rpc_fault (test xml-rpc) xml_node_get_first_child xml_node_get_first_child test_xml_rpc_fault->xml_node_get_first_child test_xml_rpc_respond xml_rpc_respond (test xml-rpc) test_xml_rpc_respond->xml_node_get_first_child xmlrpc::decode_value xmlrpc::decode_value (private) xmlrpc::decode_value->xml_node_get_first_child xmlrpc::invoke xmlrpc::invoke (private) xmlrpc::invoke->xml_node_get_first_child xmlrpc::parse_response xmlrpc::parse_response (private) xmlrpc::parse_response->xml_node_get_first_child

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):
%3 apm::package_version::attributes::parse_xml apm::package_version::attributes::parse_xml (private) xml_node_get_first_child_by_name xml_node_get_first_child_by_name apm::package_version::attributes::parse_xml->xml_node_get_first_child_by_name apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->xml_node_get_first_child_by_name apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->xml_node_get_first_child_by_name apm_tag_value apm_tag_value (private) apm_tag_value->xml_node_get_first_child_by_name db_qd_internal_parse_one_query_from_xml_node db_qd_internal_parse_one_query_from_xml_node (private) db_qd_internal_parse_one_query_from_xml_node->xml_node_get_first_child_by_name

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):
%3 apm_invoke_install_proc apm_invoke_install_proc (public) xml_node_get_name xml_node_get_name apm_invoke_install_proc->xml_node_get_name apm_read_package_info_file apm_read_package_info_file (public) apm_read_package_info_file->xml_node_get_name apm_required_attribute_value apm_required_attribute_value (public) apm_required_attribute_value->xml_node_get_name auth::sync::process_doc::ims::GetAcknowledgementDocument auth::sync::process_doc::ims::GetAcknowledgementDocument (private) auth::sync::process_doc::ims::GetAcknowledgementDocument->xml_node_get_name auth::sync::process_doc::ims::ProcessDocument auth::sync::process_doc::ims::ProcessDocument (private) auth::sync::process_doc::ims::ProcessDocument->xml_node_get_name

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):
%3

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):
%3 install::xml::action::location install::xml::action::location (public) xml_node_set_attribute xml_node_set_attribute install::xml::action::location->xml_node_set_attribute install::xml::action::wizard install::xml::action::wizard (public) install::xml::action::wizard->xml_node_set_attribute

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):
%3 test_files__check_xql_files files__check_xql_files (test acs-tcl) xml_parse xml_parse test_files__check_xql_files->xml_parse test_xml_get_child_node_content_by_path xml_get_child_node_content_by_path (test acs-tcl) test_xml_get_child_node_content_by_path->xml_parse test_xml_rpc_decode_value xml_rpc_decode_value (test xml-rpc) test_xml_rpc_decode_value->xml_parse test_xml_rpc_fault xml_rpc_fault (test xml-rpc) test_xml_rpc_fault->xml_parse test_xml_rpc_respond xml_rpc_respond (test xml-rpc) test_xml_rpc_respond->xml_parse dom dom xml_parse->dom aa_test::parse_install_file aa_test::parse_install_file (public) aa_test::parse_install_file->xml_parse aa_test::parse_test_file aa_test::parse_test_file (public) aa_test::parse_test_file->xml_parse apm_get_package_repository apm_get_package_repository (public) apm_get_package_repository->xml_parse apm_load_install_xml apm_load_install_xml (private) apm_load_install_xml->xml_parse apm_load_install_xml_file apm_load_install_xml_file (private) apm_load_install_xml_file->xml_parse

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):
%3

Testcases:
No testcase defined.
[ show source ]