hksoftware
Technical User
I'm loading an XML document and then parsing it.
This script works fine of all of my clients except 1.
His domxml_open_mem() function dies, saying:
Extra content at the end of the document
So I checked the XML file and the end looks like this:
</Question>
</ResultSet>
<!--
ws02.search.re2.yahoo.com compressed/chunked Wed Aug 15 04:09:16 PDT 2007
-->
So I added the following gode to remove that comment:
// Remove any trailing content.
$endpos=strpos($xml,'</ResultSet>');
$endpos=$endpos+12;
$xml=substr($xml,0,$endpos);
So now the end of the XML document looks like this (as it should):
</Question>
</ResultSet>
But he's still getting the same error.
What is his DOMXML not liking about the end of the XML document that no others mind?
This script works fine of all of my clients except 1.
His domxml_open_mem() function dies, saying:
Extra content at the end of the document
So I checked the XML file and the end looks like this:
</Question>
</ResultSet>
<!--
ws02.search.re2.yahoo.com compressed/chunked Wed Aug 15 04:09:16 PDT 2007
-->
So I added the following gode to remove that comment:
// Remove any trailing content.
$endpos=strpos($xml,'</ResultSet>');
$endpos=$endpos+12;
$xml=substr($xml,0,$endpos);
So now the end of the XML document looks like this (as it should):
</Question>
</ResultSet>
But he's still getting the same error.
What is his DOMXML not liking about the end of the XML document that no others mind?