Lately I have been trying to get into the XML trend and use it for my configuration files instead of using .txt not for any reason other than I like that XML is a little neater.
Naturally I started off at the PHP website looking at all the choices for XML manipulation. I (for the moment) chose SimpleXML to start with and have hit a roadblock.
How can I change a value in the file itself. Here is a code example of how I was thinking it would work:
$xml = new SimpleXMLElement("config.xml",NULL,TRUE);
print $s->node . "\n"; //Prints SOMETHING
$s->node = "NOTHING";
print $s->host . "\n"; //Prints NOTHING
Great on first appearance it looks great, it changed the value and we are all set but with a little investigating and double checking I found it did not.
What am I doing wrong?