Microsoft.XMLHTTP documentElement is NULL



Can someone offer some troubleshooting tips here? My PostXML() return value is NULL for a very small subset of data results. This works for 99.9% of usage. I think the failed data may have special characters perhaps, but comparing to a similar dataset, its identical and passes OK? The oXMLDoc.xml in File.asp contains a valid XML string while debugging, but its null when it gets back to my JS call.


Is there any known issues with what looks like a valid XML element getting trashed in the Microsoft.XMLHTTP object?



function PostXML(sXML)

{
var oHTTPPost = new ActiveXObject("Microsoft.XMLHTTP");
oHTTPPost.Open("POST","File.asp", false);
oHTTPPost.send(sXML);

// documentElement is null???
return oHTTPPost.responseXML.documentElement;
}


File.asp



<%
' oXMLDoc.xml contains valid XML here, but is NULL in the calling JS
Response.Write oXMLDoc.xml
%>

No comments:

Post a Comment