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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
biggipsy
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 6:07 am

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

Post by biggipsy »

Good morning

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

Thank you
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

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

Post by arjan.top »

just use unset() on the element
biggipsy
Forum Newbie
Posts: 12
Joined: Tue Apr 08, 2008 6:07 am

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

Post 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);

}
Post Reply