I've figured out how to read and add elements to an xml file--but only what the tutorials have shown me i.e.:
Code: Select all
$xml = new SimpleXMLElement('new.xml', null, true);
foreach ($xml->movie[0]->characters->character as $c) {
echo $c->name, ' - played by: ';
echo $c->actor, '<br />';
}I am going to be making regularly updating an xml file with every main element having an attribute that is a date stamp.
i.e.
Code: Select all
<entries>
<entry date="2008_02_02_15_56">
<blah>Blah blah</blah>
<blah2>Blah blah</blah2>
</entry>
<entry date="2008_02_07_12_23">
<blah>Blah blah</blah>
<blah2>Blah blah</blah2>
</entry>
</entries>
Thanks so much in advance. If I wasn't clear please ask for clarification.
If I'm too new for this forum, please put my email address on some spam list and torch this post.