Hi All,
I would like to know if there is any way to auto-indent the XML file when I
add a new node in a docxml object and export the string of the created XML
file with dumpmem() function...

For example:
$new = new_xmldoc("1.0");
$root = $new->add_root("ROOT");
$level1 = $root->new_child("LEVEL-1", "");
$level1->new_child("LEVEL2", "");
$new_xml_file = fopen ("test.xml", "w");
fwrite($new_xml_file, $new->dumpmem());
fclose ($new_xml_file);

The result in test.xml file is:
<?xml version="1.0"?> <ROOT><LEVEL-1><LEVEL2/></LEVEL-1></ROOT>

But I'm needing it like this: 

<?xml version="1.0"?>

<ROOT>
        <LEVEL-1>
                <LEVEL2/>
        </LEVEL-1>
</ROOT>



Could someone help me on this?!
Thanks. 
_________________________________
Ricardo J. A. Júnior, Software Engineer Trainee
Bowne Global Solutions

Phone   +55 21 2515 7713
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>

www.bowneglobal.com.br <http://www.bowneglobal.com.br/> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to