I have an Xml Stream that I would like to read in XElement . I have seen samples that use XmlTextReader , but I need this in XElement .
The code I have so far is:
string url = String.Format( "http://dev.virtualearth.net/REST/v1/Locations/{0}?o=xml&key={1}", HttpUtility.UrlEncode( AddressQuery ), mapkey ); HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; XmlTextReader reader = new XmlTextReader( url );
I'm just not sure how to get the reader to enter XElement. Maybe I'm wrong.
source share