getAllChildren doesn't return a reference
Status: Beta
Brought to you by:
psychogenic
<snip>
$root =& $parsedDoc->getRoot();
$banners =& $root->getElement('banners');
$banner =& $banners->getAllChildren('banner');
</snip>
$banner is a copy, so if you change anything in it
like
$banner[0].attribute('ID','123');
and
use
$parsedDoc->toString() this doesn't contain the
changes.
i'm using miniXML 1.2.6
the problem is solved when you change the following
line's in element.inc.php
line 595
change $retArray[$count++] = $this->xchildren[$i];
into $retArray[$count++] =& $this->xchildren[$i];
line 600
change $retArray[$count++] = $this->xchildren[$i];
into $retArray[$count++] =& $this->xchildren[$i];
i'm hoping this will save others some time
Logged In: YES
user_id=859514
Thanks for that tip!
But your forgot a line - change line 581 the same way:
line 581:
change $retArray[$count++] = $this->xchildren[$i];
into $retArray[$count++] =& $this->xchildren[$i];