using System;
using System.Linq;
using System.Xml;
using System.IO;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass
{
public static void Main()
{
String xmlString = @"
- test with a child element stuff
";
using (XmlReader reader = XmlReader.Create(new StringReader(xmlString)))
{
if (reader.HasAttributes)
{
Console.WriteLine("Attributes of <" + reader.Name + ">");
for (int i = 0; i < reader.AttributeCount; i++)
{
Console.WriteLine(" {0}", reader[i]);
}
reader.MoveToElement();
}
}
}
}