|
| I'm having trouble opening nested XML files. To open and parse an XML file I
do this:
IXMLDOMSchemaCollection* schema_cache = NULL;
ISAXXMLReader* sax2_xml_reader = NULL;
....
if (!sax2_xml_reader) return;
HRESULT hr = sax2_xml_reader->putFeature(L"schema-validation", VARIANT_FALSE);
hr = sax2_xml_reader->putFeature(L"exhaustive-errors", VARIANT_TRUE);
hr = sax2_xml_reader->putContentHandler(this);
hr = sax2_xml_reader->putErrorHandler(this);
open_tokenisers.push_back(make_pair(L"", this));
hr = sax2_xml_reader->parseURL((const
wchar_t*)filename.get_temporary_uni_chars());
if (!FAILED(hr))
{
xml_tab << "Success\n";
}
else
{
xml_tab << "Failure\n";
m_valid = false;
}
open_tokenisers.pop_back();
On one occasion, during parseURL, the code is reentered. The file parses
correctly, and the enclosing file also parses correctly. However, the next
time I execute this code to parse a subsequent XML file, I get an unhandled
exception during the call to PutContentHandler.
Anyone got any ideas?
Regards,
Guy
|
|