[XML_Tree] getTreeFromString($xml)
| From: | Matthias H. Risse | Date: | Thu, 06 Nov 2003 20:09:48 +0000 |
| Subject: | [XML_Tree] getTreeFromString($xml) | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8820@lists.php.net to get a copy of this message | ||
Hello folks:
This works for my XML data:
[..]
$tree = new XML_Tree();
$root =& $tree->getTreeFromFile('./pages.xml');
[..]
Just when I hand in the same data as a string (submited to a HTML form
and send using HTTP/POST) I run into problems. So this here doesnt _not_ work:
[..]
$tree = new XML_Tree();
$root =& $tree->getTreeFromString($xml);
[..]
When var_dumping($root) i get this PEAR/XML_Parser-error:
[..]
' not well-formed (invalid token) at XML input line 1 '
[..]
Obviously the input data is invalid, but its the same as in the file.
So i thought there might be something wrong with the "-characters so
I backquoted them - no difference, same error.
Comments appriciated.
Thanks in advance,
~~M