$xpath = new DOMXPATH($xml);
foreach($xpath->query("/root/info[name = '$c_name']") as $node)
{
$node->parentNode->removeChild($node);
}
Am getting this error when executing this code on localhost. "Warning: DOMXPath::query(): Invalid expression " I guess there is an error in the foreach loop. How can i remedy for this!
Aucun commentaire:
Enregistrer un commentaire