Note Submitter: benbakelaar at gmail dot com
Reason: bad code
----
keyword: XML PHP parser error on line 1
after a grand struggle, the answer to my problem was simply:
stripslashes()
when XML content gets transferred via HTML through a POST,
" and ' becomes \" and \'.
xml_parser_create then does not locate the header of the XML
string variable, and you get XML error: something whatever
line 1.
so grab your POSTed variable, but before you send it to your
parser (if you are using a freely available user-created
function such as xmlize() or something, chances are still
they are within the function using xml_parser_create), make
sure you run this:
stripslashes($_POST["xmlvariable"]);
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|