mshtml: Add IHTMLXMLHttpRequest::responseXML() method implementation.
Zhenbo Li
litimetal at gmail.com
Wed Nov 4 06:07:33 CST 2015
Hi Nikolay,
Thanks for your reply.
2015-11-04 16:35 GMT+08:00 Nikolay Sivov <bunglehead at gmail.com>:
> On 04.11.2015 11:13, Zhenbo Li wrote:
>>
>> + hres = IXMLDOMDocument_loadXML(xmldoc, str, &vbool);
>> + if(FAILED(hres)) {
>> + ERR("loadXML(%s) failed: %08x\n", debugstr_w(str), hres);
>> + IXMLDOMDocument_Release(xmldoc);
>> + SysFreeString(str);
>> + return hres;
>> + }
>
>
> This is not how it works. loadXML() returns S_FALSE on load failure as well,
> so you have to test strictly for S_OK, or check VARIANT_BOOL argument. You
> can probably add a test when invalid xml stream is received to see how
> _get_responseXML() behaves, e.g. does it return S_FALSE and a valid
> IDispatch or does it fail and return NULL.
>
You're right. I checked the test case for msxml3.dll, and modified my code to:
hres = IXMLDOMDocument_loadXML(xmldoc, str, &vbool);
if(vbool != VARIANT_TRUE) {
ERR("loadXML(%s) failed: %08x\n", debugstr_w(str), hres);
IXMLDOMDocument_Release(xmldoc);
SysFreeString(str);
return hres;
}
SysFreeString(str);
> Also I don't think it's a good idea to trace xml contents.
Sorry, I'm not sure the meaning of "trace xml"
If loadXML() fails, I think the terminal output should provide verbose
information
--
Have a nice day!
Zhenbo Li
More information about the wine-devel
mailing list