Re: Aborting the LoadXML method of XmlDocument

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



stoneyowl wrote:

>
>
> "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-reply@xxxxxxxxxxxxx
> >
>
> 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-reply@xxxxxxxxxxxxx
.



Relevant Pages

  • Re: XML document in a treevie needs 57secodns
    ... Using VisualStudio 2005 and C# ... The XML File is 158kb and has the folowing structure: ... Loading the XML DOM using about 40ms ... ... why do you write slow code? ...
    (microsoft.public.dotnet.framework)
  • Re: XML document in a treevie needs 57secodns
    ... Using VisualStudio 2005 and C# ... The XML File is 158kb and has the folowing structure: ... Loading the XML DOM using about 40ms ... ... why do you write slow code? ...
    (microsoft.public.dotnet.framework)
  • RE: Data Insertion
    ... You _have_ to use schema to accomplish that, ... Inference is OK for prototyping and, may be, loading 1-2K XML files; ... Change your XML file to contain embedded schema. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: ajax, xml and applying xslt
    ... The iframe one would work because it is loading ... transform xml. ... I don't know what made me think a .net web form could ... transform xml on it's own. ...
    (comp.lang.javascript)
  • Re: Poor performance with OWC Spreadsheet
    ... CSV is not an option as i need xml formatted data for other stuff too ... and converting to csv just for loading the spreadsheet it would be ... >> trying to pull data from the control to save it. ...
    (microsoft.public.office.developer.web.components)