Jump to content

DOMNode::removeChild() expects parameter 1 to be DOMNode, null given in


petenka63

Recommended Posts

hello there,

 

Iam new to php and have the following question:

iam trying to remove through php an xml node from an xml document but get the following error, so what am I doing wrong? any help appreciated:

error:removeChild() expects parameter 1 to be DOMNode, null given

 

the code I use:

 

if($action == "del"){

$item = $inputdom->documentElement;

$oName =$item->getElementsByTagName('item')->item($_REQUEST["row"]);

$oldname = $item->removeChild($oName);

print $inputdom ->save("articles.xml");

exit();

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.