Aborting the LoadXML method of XmlDocument

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to abort the loading and parsing of a large Xml document
using the XmlDocuemnt.LoadXml(filename) method?
 
stoneyowl said:
Is there any way to abort the loading and parsing of a large Xml
document using the XmlDocuemnt.LoadXml(filename) method?

Are you sure you mean LoadXml()? This method loads from a string...

Cheers,
 
stoneyowl said:
You are right - I meant to say XmlDocument.Load("filename")....

If you need to interrupt I/O operations, you cannot use convenience
methods like XmlDocument.Load(). Use asynchronous I/O to load the XML
file from a file stream, or try loading the file on a worker thread
(which doesn't make it interruptible per se, but at least doesn't block
your man thread).

Cheers,
 
Back
Top