how I can change the attribute "id" using my source code?
static void Main(string[] args)
{
XmlTextReader reader = new XmlTextReader(@"C:\Users\1.xml");
XmlNodeList elementList = reader.
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element: // The node is an element
{
reader.ReadToFollowing("command");
reader.MoveToAttribute("id");
Console.Write(reader.Value);
Console.WriteLine(" ");
}
break;
}
}
Console.Read();
}
I saw some examples, but they have used another methods that don't work with mine. (I'm a noobie)