better use WebClient from system.net to suck the xml file into a
stream and using xmlreader to read that stream.



On 5/27/09, bbbs <[email protected]> wrote:
>
> I am writing my first code to parse an XML response obtained from a
> HTML GET response.
>
> The code is very simple :
>
>             // Create a new XmlDocument
>             XmlDocument doc = new XmlDocument();
>
>             // Load data
>             doc.Load("http://clad01/api/v1/company/list/
> 521826-440382-681782");
>
> The code is fine in that it beings back the data and I can navigate
> the XML structure fine. The problem is the response time, it takes
> 30-40 seconds for the "doc.Load" call to execute.
>
> The XML document being returned is very small approx 300-400bytes, and
> the webserver is a local Apache instance on the same machine. If I
> access the URL via a browser the response is instantaneous.
>
> Any ideas on what I can do to speed this up? Is there a better way of
> doing this?
>
> thanks
> RK
>

Reply via email to