المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to read the specific tag [modified]



C# Programming
04-13-2009, 12:22 PM
hi all

This is to read the tag line by line.
using System.Xml;

...
...
...

XmlTextReader reader = new XmlTextReader ("reader.xml");
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element: // The node is an element.
Console.Write("");
break;
case XmlNodeType.Text: //Display the text in each element.
Console.WriteLine (reader.Value);
break;
case XmlNodeType.EndElement: //Display the end of the element.
Console.Write("");
break;
}
}
Console.ReadLine();



How do i read the specific tag
if i just want to read all the tag that have this < big > tag?

thank you

modified on Monday, April 13, 2009 3:36 AM