Julio Cezar Novais Raffaine - 2007-06-21 15:49:42
First Tip:
- How to delete nodes.
First, you need to change function toXML().
Add a verification in the second foreach. like:
if(child != NULL) {
bla bla bla
child->toXML(niveau+1);
}
This is important, cause if you don't do this, you are going to receive error messages.
After this, just get the node you want to delete, and do something like this:
$node =& $root->findFirstChild($name);
$node = NULL;
$xml = $root->toXML(0);
After this just write $xml in a file, and it's done, you don't have that node anymore. Simple isn't it.
That's all Folks.