Trouble...
| From: | Leandro Martín Peralta | Date: | Thu, 01 Feb 2007 20:05:12 +0000 |
| Subject: | Trouble... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-248165@lists.php.net to get a copy of this message | ||
I have an xml stored in a variable. If I load it in a domdocument as HTML:
$DDoc->loadHTML($xml);
I can get elements by an xpath query, but if I instead load it as XML my
xpath queries stop working:
$DDoc = new DOMDocument();
$DDoc->loadXML($xml);
$xpath = new DOMXPath($DDoc);
$query = "//li[@week=".$i."]";
$topics = $xpath->query($query);
I've checked that the xml is well formated, no error or warning is
displayed. $topics is just empty. Do anyone know why this could happen?
Thank you for your attention.