Programming a timeout in xml.load..how?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Greg Merideth

    #1

    Programming a timeout in xml.load..how?

    Here is the shortened version of the code i'm using to
    load in a remote xml file and then save it to the local
    machine. I can't figure out how to program a timeout into
    the xml.load function or what can cause the try{} block to
    fail. I tried passing in a bum URL that did not goto a
    valid .xml file and the try{} block never failed. It
    looks like .load never came back at all with an error.

    try
    {
    xmlDomDocument = new XmlDocument();
    xmlDomDocument. Load(pstrLoadUr lFilename);
    xmlDomDocument. Save(pstrLocalF ilepath);
    }
    catch(Exception e)
    {
    MessageBox.Show ("error","") ;
    }

Working...