apm::package_version::attributes::generate_xml_element (private)

 apm::package_version::attributes::generate_xml_element \
    [ -indentation indentation ] -element_name element_name \
    [ -attribute_name attribute_name ] [ -multiple ] -value value

Defined in packages/acs-tcl/tcl/apm-install-procs.tcl

Format an XML element with a value depending on the specified arguments

Switches:
-indentation
(optional)
-element_name
(required)
-attribute_name
(optional)
code the value as XML attribute
-multiple
(boolean) (defaults to "false") (optional)
treat the value as a list and produce multiple XML elements
-value
(required)
Returns:
the XML-formatted string
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 apm::package_version::attributes::get_spec apm::package_version::attributes::get_spec (public) apm::package_version::attributes::generate_xml_element apm::package_version::attributes::generate_xml_element apm::package_version::attributes::get_spec->apm::package_version::attributes::generate_xml_element

Testcases:
No testcase defined.
Source code:
    if {$multiple_p} {
        set xm_string ""
        foreach v $value {
            append xml_string [generate_xml_element  -indentation $indentation  -element_name $element_name  -attribute_name $attribute_name  -value $v]
        }
    } else {
        if {$attribute_name eq ""} {
            set xml_string "${indentation}<${element_name}>[ns_quotehtml $value]</${element_name}>\n"
        } else {
            set xml_string "${indentation}<$element_name $attribute_name=\"[ns_quotehtml $value]\"/>\n"
        }
    }
    return $xml_string
Generic XQL file:
packages/acs-tcl/tcl/apm-install-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-install-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-install-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: