これは、1 つの URL の xml を取得するために作成したコードですが、任意の URL で「ルート レベルのデータが無効です」と表示されます。誰かが理由を指定できますか?
XmlDocument xdoc = new XmlDocument();//xml doc used for xml parsing
xdoc.LoadXml("http://latestpackagingnews.blogspot.com/feeds/posts/default");//loading XML in xml doc
XmlNodeList xNodelst = xdoc.DocumentElement.SelectNodes("entry");//reading node so that we can traverse thorugh the XML
Response.Write(xNodelst);