PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

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