XML Module

XML helper functions. Call these helper functions from $core->xml

array_to_xml($array, $root_tag = false, $indent = 0)

Convert an array to formatted XML and return it as a string. This function supports both associative and indexed arrays. However, indexed arrays must provide the singular name to use as the containing XML tag for each of the array elements. You specify this singular name by adding an array key called '__singular' with the value set to the singlar name.