From my reserach on the Net (php.net does not seem to have any info on this), it seems this error is mostly due to unacceptable characters ('&' being the main suspect I believe) in the XML document being parsed. But I have a strange problem with a simple XML Document that I cannot debug. The following lines of code are responsible:
$parser = xml_parser_create('');
xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
$suc = xml_parse_into_struct($parser,$ret,&$val,&$index);
if (!$suc)
self::logIt("got an error parsing \n$ret\n:".xml_error_string(xml_get_error_code($parser)));
xml_parser_free($parser);
The corresponding log entry is:
07 Jan 2010 01:32:45: got an error parsing
<?xml version="1.0" encoding="UTF-8"?>
<array>
<1>platinum</1>
<2>gold</2>
<3>value</3>
</array>
:XML_ERR_NAME_REQUIRED
The Soap response the above XML came from is is:
Any pointers would be highly appreciated!!