Page 1 of 1

How can erase a "child" or "node" in XML using simpleXML?

Posted: Wed Apr 09, 2008 4:37 am
by biggipsy
Good morning

I need help.....How can erase a "child" or "node" in xml if i use simpleXML?

Thank you

Re: How can erase a "child" or "node" in XML using simpleXML?

Posted: Wed Apr 09, 2008 4:45 am
by arjan.top
just use unset() on the element

Re: How can erase a "child" or "node" in XML using simpleXML?

Posted: Wed Apr 09, 2008 4:57 am
by biggipsy
Thank for the help

but I can write the code this way?

<?php
$xml = simplexml_load_file('xmltest.xml');

$a = $xml->no [0];

{

unset($a);

}