Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML document using httpget

Status
Not open for further replies.

GreatSeaSpider

Programmer
Jul 14, 2003
70
0
0
GB
hi guys,

a script i'm writing needs to access an xml file on another web server which i access using httpget like this:


i'm not great at .net so i was wondering if somebody could point me in the right direction

at the moment i'm trying to open it using
XmlDocument.Load()

but its not working!

thanks in advance,

Peter
 
Peter - little experience in what you're doing but you might consider looking into the XMLTextReader Class (provides fast, forward-only access to the raw data contained within an XML file). May not work here, but you should take a close look at this option.
 
An idea to get you started:
Code:
System.Net.WebRequest wreq = System.Net.WebRequest.Create("[URL unfurl="true"]http://user:pass@www.domain.com/CURRENT.XML");[/URL]
System.Net.WebResponse wres = wreq.GetResponse();
System.IO.Stream sXML=wres.GetResponseStream();
System.Xml.XmlTextReader xmlTR=new System.Xml.XmlTextReader(sXML);

Hope this helps!

[morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top