Tuesday, August 11, 2009

XML Reading in Mobile Application

XML reading in mobile application:

The Mobile application will read the xml from online news feeds by using GPRS .
We have to copy following code and give the url following . it will read the xml
and will be displayed at specified field


XmlTextReader m = new XmlTextReader("");
while (m.Read())
{
while (m.Name != "item")
m.Read();
while (m.Name != "title")
m.Read();
string title = m.ReadElementContentAsString();
while (m.Name != "description")
m.Read();
string desc = m.ReadElementContentAsString();
textBox1.Text = desc;
}

No comments:

Post a Comment