Home All Groups Group Topic Archive Search About

Aborting the LoadXML method of XmlDocument

Author
15 Dec 2005 7:24 PM
stoneyowl
Is there any way to abort the loading and parsing of a large Xml document
using the XmlDocuemnt.LoadXml(filename) method?

Author
15 Dec 2005 7:43 PM
Joerg Jooss
stoneyowl wrote:

> 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,
--
http://www.joergjooss.de
mailto:news-re***@joergjooss.de
Author
20 Dec 2005 5:16 PM
stoneyowl
Show quote
"Joerg Jooss" wrote:

> stoneyowl wrote:
>
> > 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,
> --
> http://www.joergjooss.de
> mailto:news-re***@joergjooss.de
>

You are right - I meant to say XmlDocument.Load("filename")....
Author
20 Dec 2005 9:54 PM
Joerg Jooss
stoneyowl wrote:

Show quote
>
>
> "Joerg Jooss" wrote:
>
> > stoneyowl wrote:
> >
> > > 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,
> > --
> > http://www.joergjooss.de
> > mailto:news-re***@joergjooss.de
> >
>
> 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,
--
http://www.joergjooss.de
mailto:news-re***@joergjooss.de

AddThis Social Bookmark Button