C
César A. Fong Espinola
Hi, a few weeks ago i have prepared a demo that consuming an rss. Our RSS
(www.todopocketpc.com/rss/rss.asp) would be our consumed rss. But when i try
to execute this code in .Net CF
Public Function obtenerRSS(ByVal pistrURL As String) As XmlDocument
Try
Dim xmldoc As New XmlDocument
Dim writer As XmlTextWriter = New XmlTextWriter(App_Path() & "rss.xml",
Nothing)
Dim request As HttpWebRequest = CType(WebRequest.Create(pistrURL),
HttpWebRequest)
request.ContentType = "text/xml"
Dim response As HttpWebResponse = CType(request.GetResponse,
HttpWebResponse)
xmldoc.Load(response.GetResponseStream())
writer.Formatting = Formatting.Indented
xmldoc.Save(writer)
response.Close()
writer.Close()
Return xmldoc
Catch e As System.Exception
MsgBox(e.ToString)
End Try
End Function
Returns me an error i notice this because our site has this encoding for
being a spanish web site is <?xml version="1.0" encoding="ISO-8859-1" ?>
For my test i have to create another page without the tag encoding and of
course i have to parse and omitted the accented characters and some signs.
is this a bug for .Net CF or do i have to use another method???
Thanks in advanced
Cesar
(www.todopocketpc.com/rss/rss.asp) would be our consumed rss. But when i try
to execute this code in .Net CF
Public Function obtenerRSS(ByVal pistrURL As String) As XmlDocument
Try
Dim xmldoc As New XmlDocument
Dim writer As XmlTextWriter = New XmlTextWriter(App_Path() & "rss.xml",
Nothing)
Dim request As HttpWebRequest = CType(WebRequest.Create(pistrURL),
HttpWebRequest)
request.ContentType = "text/xml"
Dim response As HttpWebResponse = CType(request.GetResponse,
HttpWebResponse)
xmldoc.Load(response.GetResponseStream())
writer.Formatting = Formatting.Indented
xmldoc.Save(writer)
response.Close()
writer.Close()
Return xmldoc
Catch e As System.Exception
MsgBox(e.ToString)
End Try
End Function
Returns me an error i notice this because our site has this encoding for
being a spanish web site is <?xml version="1.0" encoding="ISO-8859-1" ?>
For my test i have to create another page without the tag encoding and of
course i have to parse and omitted the accented characters and some signs.
is this a bug for .Net CF or do i have to use another method???
Thanks in advanced
Cesar