備忘録としてSystem.Xml.XmlTextReaderのサンプルを載せておきます。
public static void ReadXMLSample(string path)
{
for (XmlReader textReader = new XmlTextReader(path);
textReader.Read();
textReader.MoveToElement())
{
Console.WriteLine("===================");
Console.WriteLine("Name:" + textReader.Name);
Console.WriteLine("Base URI:" + textReader.BaseURI);
Console.WriteLine("Local Name:" + textReader.LocalName);
Console.WriteLine("Attribute Count:" + textReader.AttributeCount);
Console.WriteLine("Depth:" + textReader.Depth);
Console.WriteLine("Node Type:" + textReader.NodeType);
}
}
コメント