Hi I am trying to parse some xml from a weird xml document developed by icalander. I have been having a lot of trouble just parsing the data, but thanks to the help of people from stackoverflow I have been able to parse the data. Now I need some help parsing between the nodes. Here is a link to the xml file I am parsing from (http://datastore.unm.edu/events/events.xml)
I am using the pivotapp model from Visual Studio 2010 to create this app. In the MainViewModel.cs section I am modifying the following code in hopes that the tag will print out in place of "LineOne" (code listed below). For example, from the xml file linked above, I would like LineOne = Lobo's Got Talent.
I need help figuring out the best method to achieve this, I will need LineTwo to contain the date and time, and LineThree to contain the description.
Thank you for your time and help, it has been greatly appreciated!
public void LoadData()
{
var webClient = new WebClient();
webClient.OpenReadAsync(new Uri("http://datastore.unm.edu/events/events.xml"));
webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(webClient_OpenReadCompleted);
}
public void webClient_OpenReadCompleted(object sender,
OpenReadCompletedEventArgs e)
{
XDocument unmXdoc = XDocument.Load(e.Result, LoadOptions.None);
this.Items.Add(new ItemViewModel() { LineOne = unmXdoc.ToString(),
LineTwo = "", LineThree = "" });
}
Thank you for looking and helping!