Last post Jul 26, 2011 10:15 PM by Decker Dong - MSFT
Jul 25, 2011 03:17 PM|kylemac|LINK
I'm trying to read a xml file (from facebook) into my page.
I keep getting an error. Can't figure it out.
This throws an exception:
"An error occurred while parsing EntityName. Line 12, position 53."
Any thoughts? Thanks!
Jul 26, 2011 03:56 AM|j_parareda|LINK
Read a Xml File with Dataset isn't popular. Is this link a Datatable? It seem a rss file.
You could try read xml with XmlDocument class or XDocument class. With XDocument class you can use LINQ for search nodes. Very usefull.
I hope help you.
Jul 26, 2011 04:58 AM|smirnov|LINK
Dim doc As XmlDocument = New XmlDocument()
Dim req As HttpWebRequest = WebRequest.Create("http://www.facebook.com/feeds/page.php?id=68310606562&format=rss20")
req.UserAgent = "Mozilla/4.0"
Dim resp As WebResponse = req.GetResponse()
Dim reader As StreamReader = New StreamReader(resp.GetResponseStream())
Dim xml As String = reader.ReadToEnd()
Hope this helps.
Jul 26, 2011 10:15 PM|Decker Dong - MSFT|LINK
Not every kind of xml contents can be converted into a DataTable or a DataSet successfully. Only formattion like this can be done with that——
Have a try of "Star"'s answer and this can solve your problem.