I am trying to debug what appears to be an XML parsing issue in my code. I have isolated it down to the following code snippet:
HRESULT
CXmlDocument::Load(IStream* Stream)
{
CComVariant xmlSource(static_cast<IUnknown*>(Stream));
VARIANT_BOOL isSuccessful;
* HRESULT hr = m_pXmlDoc->load(xmlSource, &isSuccessful);
return (hr == S_FALSE) ? E_FAIL : hr;
}
Note: m_pXmlDoc
is of the type CComPtr<IXMLDOMDocument>
.
It appears that the call to IXMLDOMDocument::load()
(marked with the *) is failing - IOW, it is returning S_FALSE
.
I am not able to step into load()
to determine why it is failing, as it is a COM call.
The MSDN page for this method doesn't seem to be giving a lot of insight.
I have a few hunches:
- The XML is not well-formed
- The XML file is too large (approximately 120MB)
- It is a memory-related issue (the process size gets to > 2GB at the time of failure)
- NB: A registry key has been set to allow the process size to be this large, as the largest valid process size for WinXP, AFAIK, is 2GB).
Any ideas as to why this call could be failing?