note 96153 modified in simplexmlelement.xpath by thiago

From: Date: Thu, 11 Feb 2010 12:48:45 +0000
Subject: note 96153 modified in simplexmlelement.xpath by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165866@lists.php.net to get a copy of this message
On a xml that have namespace you need to do this before your xpath request (or empty array will be return) : <?php $string = str_replace('xmlns=', 'ns=', $string); //$string is a string that contains xml... ?> --was-- On a xml that have namespace you need to do this before your xpath request (or empty array will be return) : $string = str_replace('xmlns=', 'ns=', $string); //$string is a string that contains xml... http://php.net/manual/en/simplexmlelement.xpath.php

« previous php.notes (#165866) next »