Remove all children from a XML Node PHP DOM

yoru_san

New Member
I want to remove all children from a XML Node using PHP DOM, is there any difference between:A)\[code\]while ($parentNode->hasChildNodes()){ $parentNode->removeChild($parentNode->childNodes->item(0)); }\[/code\]ANDB)\[code\]$node->nodeValuehttp://stackoverflow.com/questions/3603739/= "";\[/code\]I prefer the second one, seems like I am getting the same result but I'm not sure.Thanks,Carlos
 
Back
Top