I want to load a xml document from a web to my program
so i wrote these lines:
Dim xDoc As XmlDocument = New XmlDocument() xDoc.Load("http://www.ims.gov.il/ims/PublicXML/isr_cities.xml")
sometimes it works well,but sometimes it fail
when it fail sometimes it throw this exception :
"Too many automatic redirections were attempted."
and sometimes it look like everything okay but it is fail to load the xml document to my object of "XmlDocument"
i discovered it because in the property "innerxml"
instead of containing xml of my document it containing html like:
<pre lang="HTML"><html><body><script>document.cookie='bbbbbbb=53cf4d9cbbbbbbb_53cf4d9c; path=/';window.location.href=window.location.href;</script></body></html>
what can I do in order to fix it ???
please help me -
it very urgent!!!!
thank you so much
What I have tried:
xDoc = New XmlDocument()
xDoc.Load("http://www.ims.gov.il/ims/PublicXML/isr_cities.xml")
rssNodes = xDoc.SelectNodes("/IsraelCitiesWeatherForecastMorning/Location")
but it fail