Hello,
I'm building an rss reader, works fine for all rss feeds, except for this
one (you can try the sample code)
The program stops on myxml.LoadXml(c ontent)
Any ideas why this happens, I'm searching already for 2 days now.
code
-------------------------------------------------------------------------
Imports System.Xml
Imports System.Data
Imports System.Data.Sql Client
Imports System.Net
Imports System.IO
Module Module1
Sub Main()
Dim req As HttpWebRequest
Dim res As HttpWebResponse
Dim myreader As StreamReader
Dim content As String
req = HttpWebRequest. Create("http://www.politics.be/backend2.php")
req.UserAgent = "Mozilla/6.0 (MSIE 6.1; Windows NT 5.1;)"
req.MaximumAuto maticRedirectio ns = 20
req.Timeout = 10000
req.Proxy = GlobalProxySele ction.GetEmptyW ebProxy()
req.KeepAlive = False
res = req.GetResponse
myreader = New StreamReader(re s.GetResponseSt ream)
content = myreader.ReadTo End()
myreader.Close( )
myreader = Nothing
res.Close()
res = Nothing
req = Nothing
Dim myxml As New Xml.XmlDocument
Console.WriteLi ne(content)
myxml.LoadXml(c ontent) 'this line gives the problem
myxml = Nothing
Console.ReadLin e()
End Sub
End Module
-------------------------------------------------------------------------------------
I'm building an rss reader, works fine for all rss feeds, except for this
one (you can try the sample code)
The program stops on myxml.LoadXml(c ontent)
Any ideas why this happens, I'm searching already for 2 days now.
code
-------------------------------------------------------------------------
Imports System.Xml
Imports System.Data
Imports System.Data.Sql Client
Imports System.Net
Imports System.IO
Module Module1
Sub Main()
Dim req As HttpWebRequest
Dim res As HttpWebResponse
Dim myreader As StreamReader
Dim content As String
req = HttpWebRequest. Create("http://www.politics.be/backend2.php")
req.UserAgent = "Mozilla/6.0 (MSIE 6.1; Windows NT 5.1;)"
req.MaximumAuto maticRedirectio ns = 20
req.Timeout = 10000
req.Proxy = GlobalProxySele ction.GetEmptyW ebProxy()
req.KeepAlive = False
res = req.GetResponse
myreader = New StreamReader(re s.GetResponseSt ream)
content = myreader.ReadTo End()
myreader.Close( )
myreader = Nothing
res.Close()
res = Nothing
req = Nothing
Dim myxml As New Xml.XmlDocument
Console.WriteLi ne(content)
myxml.LoadXml(c ontent) 'this line gives the problem
myxml = Nothing
Console.ReadLin e()
End Sub
End Module
-------------------------------------------------------------------------------------
Comment