KC̉𓚁B4C#ŁiCS04.csj

using System;
using System.Xml;
using System.Text;

namespace CS04
{
	/// <summary>
	/// Class1 ̊Tv̐łB
	/// </summary>
	class Class1
	{
		/// <summary>
		/// AvP[ṼC Gg |CgłB
		/// </summary>
		[STAThread]
		static void Main(string[] args)
		{
			int n;
			XmlTextReader xtr=new XmlTextReader("../../../CS03/CS03output.xml");
			while(xtr.Read())
			{
				if(xtr.NodeType==XmlNodeType.Element )
				{
					if(xtr.HasAttributes)
					{
						for(n=0;n<xtr.Depth;n++)
							Console.Write("  ");
						Console.Write(" {0}", xtr.Name);
						if(xtr.HasValue)
						   Console.WriteLine(" {0}", xtr.Value);
						else
							Console.WriteLine();
						while (xtr.MoveToNextAttribute())
						{
							for(n=0;n<xtr.Depth;n++)
								Console.Write("  ");
							Console.Write(" {0}", xtr.Name);
							if(xtr.HasValue)
								Console.WriteLine(" {0}", xtr.Value);
							else
								Console.WriteLine();
						}
					}
		
				}
			}
			xtr.Close();
		}
	}
}

/****
    Staff
     Name RcY
     SID 12
   Staff
     Name ؎Y
     SID 13
   Staff
     Name cOY
     SID 14
Press any key to continue
*****/