PEAR is archived and read-only

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

Home » XML » XML_Tree » Bug #1253

Parse more than one string per instance

Details

Submitted2004-04-21 17:01 UTC
Fromas at mindcom dot de
Assigneddavey
StatusClosed
PackageXML_Tree
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2004-04-21 17:01 UTC] as at mindcom dot de

Description:
------------
it is not possible to parse more than one document per instance. this could be fixed for example with $this->i=null at start of function "&getTreeFromString($str)"

Reproduce code:
---------------
require 'xml\tree.php';

$xmltree = new XML_Tree();
$fields = $xmltree->getTreeFromString($s1);
print_r($fields);
$xmltree->reset();
$fields =& $xmltree->getTreeFromString($s2);
print_r($fields);

Expected result:
----------------
Would be nice to see the Elements of $s1 and $s2 :-)

Actual result:
--------------
You will only see $s1 twice