Ok- so I'm sure this is just part of the learning curve, but I've got a really simple thing I'm trying to do and I don't think I'm grasping the method here:
I have an existing xml document, (staff.xml) and I want to write to it using php.
So I open it up, [ $xStaff = DomDocument::load('staff.xml'); ] and I'm trying to figure out how to put a new <person> element in there. I tried just going:
$person = $xStaff->createElement('person');
$person = $staff->appendChild($person);
but $staff hadn't been recognized as an element yet- so I was messing around with the 'importNode()' and getElementByName(); functions but I don't think I was doing those right either.
Anybody got a quick answer for me?