PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_XPath » Bug #2150

toString(/foo/bar/*) only returns the first child of bar

Details

Submitted2004-08-17 23:25 UTC
Fromylf at xung dot org
StatusBogus
PackageXML_XPath
PHP Version4.3.4
OSLinux Debian (testing)
Roadmaps(Not assigned)

Comments

[2004-08-17 23:25 UTC] ylf at xung dot org

Description:
------------
Please see the reproduce code.

--
Olivier Guilyardi

XML_XPath 1.2.1

Reproduce code:
---------------
include 'XML/XPath.php';

$xml ='<?xml version="1.0"?>
<pear_size>
<package>
<id>1</id>
<kilobytes>180</kilobytes>
<packageName>Archive_Tar</packageName>
<fileNum>5</fileNum>
</package>
</pear_size>';

$xpath = new XML_XPath($xml);
echo $xpath->toString('/pear_size/package/*');

Expected result:
----------------
<id>1</id>
<kilobytes>180</kilobytes>
<packageName>Archive_Tar</packageName>
<fileNum>5</fileNum>

Actual result:
--------------
<id>1</id>

[2004-08-18 07:40 UTC] ylf at xung dot org

Thank you for taking the time to write to us, but this is not
a bug.

I did not read the docs and example properly. This is no bug.