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 (optional, boolean, defaults to
"false"
)- 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):
- 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_stringGeneric 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