XML dumpmem not working?
| From: | Stuart V Begg | Date: | Thu, 14 Sep 2000 04:56:15 +0000 |
| Subject: | XML dumpmem not working? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-2638@lists.php.net to get a copy of this message | ||
I recently asked the list about DOM XML implementation with the Win32
code and Vince LaMonica kindly pointed me to http://www.php4win.de. I
have now installed PHP 4.0.2 with the DOM XML extension from this site,
and started testing.
Now, I know that it's not production code but I seem to be having a
specific problem with the following script:
<?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("greetings");
$root->content = "Hello World!";
print(htmlspecialchars($doc->dumpmem()));
?>
Produces the following browser output:
<?xml version="1.0"?><greetings/>
Where has the "Hello, World!" content for the root node gone?
If I print the value of $root->content after the assignment, it contains
"Hello, World!". It seems to me that the dumpmem() method is having a
problem here.
Does anyone have any clues on what is going wrong here?
Cheers, S t u a r t .