I am creating an xml file and want it to format correctly when it is viewed. I have tried adding "\n" to the string but this just adds "\n" to the file. Does anyone know how I can add line breaks to my file.
example:
produces '<?xml version="1.0" ?><element> etc....'
produces '<?xml version="1.0" ?>\n<element> etc....'
example:
Code:
$strXML = '<?xml version="1.0" ?>'
$strXML .= '<element>'
etc ....
produces '<?xml version="1.0" ?><element> etc....'
Code:
$strXML = '<?xml version="1.0" ?>\n'
$strXML .= '<element>'
etc ....
produces '<?xml version="1.0" ?>\n<element> etc....'