XML Asynchronously?

  • Thread starter Thread starter DaveC
  • Start date Start date
D

DaveC

Hello, I'm loading a rather large xml document from a remote server, but
this stalls my app? how can I load it Asynchronously, the XmlDocument class
has no .async property?

Also I would like to begin reading nodes while the document is loading. Can
this be done?

This is my two liner at the moment.
Dim xmlDoc As New Xml.XmlDocument()
xmlDoc.Load("http://www.domain.com/xmlgen.php?q=foodz")

Thanks.
DaveC
 
Pass your XMLDocument to a procedure ByRef. In that procedure invoke the
Load method and notify the application when the load is complete. Then call
this procedure asyncronously. The reference in the async procedure will
fill the XMLDocument while the reference in the calling procedure will be
use to read it. You need to test if you can read from it before it has been
completely filled. I would imagine that you would be able to but I have not
covered XMLDocuments yet.

--Robby
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top