Previous Up Next

3.7.6  Indent an XML string: xml_print

The xml_print command formats an XML string.


Example.
Input:

xml_print("<?xml version=’1.0’?><root><child1>some content</child1><child2></child2><child3/></root>")

Output:

<?xml version='1.0'?>
<root>
<child1>some content</child1>
<child2></child2>
<child3/>
</root>

Previous Up Next