Please forgive me if I am posting to the wrong forum. I am new to PHP and I need help.
I am trying to read this XML file (`myfile.xml`) using DOM:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>Code: Select all
<?php
$xmlDoc = new DOMDocument();
$xmlDoc->load("myfile.xml");
print $xmlDoc->saveXML();
?>I know I am doing something wrong: is it the code or my configuration? Can someone please help?
My sandbox config is:
RedHat 2.6.9 el
Apache 2.2.3
PHP 5.16
MySQL 5.0
Thanks.
Al.