|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-19 05:09 UTC] gab dot s at freemail dot hu
Description:
------------
OS: Debian, Linux kernel 2.4.18-bf2.4
Version: 4.3.4
libxml Version: 20506
I have used the dom xml extension for a year, and
i have a piece of code where a find for nodes in an xml document.
It works with 4.3.2-rc2 and 4.3.2, but does not works with 4.3.4.
<?php
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Application>
<first>
data
</first>
<second>
data2
</second>
</Application>";
$xmldoc = domxml_open_mem($xml);
$root = $xmldoc->document_element();
$nodearray = $xmldoc->get_elements_by_tagname("/Application");
print_r($nodearray);
?>
On php version 4.3.2-rc2 and 4.3.2:
Expected result:
Array ( [0] => domelement Object ( [type] => 1 [tagname] => Application [0] => 3 [1] => 135422608 ) )
Actual result:
Array ( [0] => domelement Object ( [type] => 1 [tagname] => Application [0] => 3 [1] => 135422608 ) )
On php version 4.3.4
Expected result:
Array ( [0] => domelement Object ( [type] => 1 [tagname] => Application [0] => 3 [1] => 135422608 ) )
Actual result:
Array ( )
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 23:00:01 2025 UTC |
$nodearray = $xmldoc->get_elements_by_tagname("/Application"); Change to: $nodearray = $xmldoc->get_elements_by_tagname("Application");