TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Abhishek Kumar Ravi
NA
11.5k
4.5m
Why i 'm getting this NULL return | XML File
Feb 15 2014 3:34 PM
I have a XML which i want to parse. But, for some reasons its not working.
public Events()
{
InitializeComponent();
StreamResourceInfo xml = Application.GetResourceStream(new Uri("News.xml",UriKind.RelativeOrAbsolute));
data = XElement.Load(xml.Stream); // ERROR
this.ManipulationStarted += new EventHandler<ManipulationStartedEventArgs>(Events_ManipulationStarted);
}
void Events_ManipulationStarted(object sender, ManipulationStartedEventArgs e)
{
var events = from item in data.Elements("Event") select item;
foreach( XElement temp in events )
{
eventItem.Add(new Model()
{
name =temp.Element("Name").Value,
image = temp.Element("Image").Value,
date = temp.Element("Date").Value,
time = temp.Element("Time").Value
});
myList.ItemsSource = eventItem;
}
}
Reply
Answers (
2
)
New Programmer.
WordFind Puzzle