Horje
c# loop xml Code Example
c# loop xml
XmlReader reader = XmlReader.Create(new System.IO.StringReader(settings));
while (reader.Read())
{
    // Note! This does loop all the ways through your xml (even child nodes)
    if (reader.NodeType == XmlNodeType.Element)
    {
		// additionally you can see switch between the nodes.
       //<parent test="asd"><child /></parent>
		switch (reader.LocalName)
        {
          case "parent":
			// Here you can access the attributes
            for (int i = 0; i < reader.AttributeCount; i++)
            {
                reader.MoveToAttribute(i);   // i = 1
                string name = reader.Name; 	 // test
				string value = reader.Value; // asd
            }
            break;

          case "child":
            break;
        }
    }
}




Csharp

Related
get position of another object unity Code Example get position of another object unity Code Example
random in f# Code Example random in f# Code Example
XMLWriter write xml C# Code Example XMLWriter write xml C# Code Example
ihttpactionresult to object c# Code Example ihttpactionresult to object c# Code Example
c# create console for winform Code Example c# create console for winform Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7