Bug #15257: Can't retrieve node content
| From: | work at gullidge dot com | Date: | Mon, 28 Jan 2002 19:13:24 +0000 |
| Subject: | Bug #15257: Can't retrieve node content | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-78324@lists.php.net to get a copy of this message | ||
From: work@gullidge.com
Operating system: Windows2000
PHP version: 4.1.1
PHP Bug Type: DOM XML related
Bug description: Can't retrieve node content
Sorry in advance if this isn't considered a bug.
The DomXML content property is no longer available in 4.1.1 as we now are
referencing elements instead of nodes, but I can't see a way of extracting
the content of the element/node.
Following works in 4.06:
$docnode = xmldoc($xmlString);
$rootNode = $docnode->root();
$nodes = $rootNode->children();
for ($nodeNumber = 0; $nodeNumber < count($nodes); $nodeNumber++) {
$nodeName = $nodes[$nodeNumber]->name;
// ... some more nodeName comparisons here
if ($nodeName == "redirect") {
$redirectURL = $nodes[$nodeNumber]->content;
}
}
In 4.1.1 tagname replaces name, but I can't see anything that replaces or
gives me a reference to content.
Again, sorry if this isn't considered a bug. I've only been coding PHP
for 2 days and I'm still finding my way around.
PS. I could do with using 4.1.1 as 4.0.6 doesn't allow https in curl
--
Edit bug report at: http://bugs.php.net/?id=15257&edit=1