Q: Possible bug in DOM XML function dumpmem() ?
| From: | Axel Tietje | Date: | Thu, 14 Dec 2000 22:07:43 +0000 |
| Subject: | Q: Possible bug in DOM XML function dumpmem() ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30371@lists.php.net to get a copy of this message | ||
Hi,
I have a problem with the DOM XML object.
How can I change the content property of a
DomNode object?
I have my nodes in an array, e.g
<?
$this -> nodes["ROOT/CURRENCY"] =
$this -> nodes["ROOT"] -> new_child("CURRENCY", "DEM");
?>
Now I have the following:
DomNode Object
[node] => Resource id #18
[type] => 1
[name] => CURRENCY
[content] => DEM
)
If I try
<? echo $this -> nodes["ROOT/CURRENCY"] -> content; ?>
the output is
DEM
If I try
<?
$this -> nodes[["ROOT/CURRENCY"] -> content = "USD";
print_r($this -> nodes[["ROOT/CURRENCY"]);
?>
it seems to do the job, because i get
DomNode Object
(
[node] => Resource id #18
[type] => 1
[name] => CURRENCY
[content] => USD
)
But if I do
<?
echo $doc -> dumpmem();
?>
the content of the changed node is not updated
in the dumped DomDocument object:
<ROOT>
<CURRENCY>DEM</CURRENCY>
</ROOT>
Is there anyone who knows about that issue? Is it a bug?
Or is the error sitting between chair and keyboard?
Any hint?
TIA, Axel
--
FLYnet FLYer Kommunikationsgesellschaft mbH
Weender Landstr. 46 37073 Göttingen 0551-499750
http://www.flynet.de a.tietje@flynet.de