Just wanted to get values from XML file of an particular attribute to store in array.
So far I did this, but it didn't make out.

C# Code

```
string[] name;
int n = 0;
using (XmlTextReader AReader = new XmlTextReader(Environment.CurrentDirectory + "\\Account.xml"))
        {
            while (AReader.Read())
            {
                AReader.ReadToFollowing("Account");
                AReader.MoveToContent();
                if (AReader.NodeType == XmlNodeType.Element && AReader.Name == "Account")
                {
                    name[n] = AReader.GetAttribute("Name");
                    n++;
                }
            }
        }

```

XML File

```
<?xml version="1.0"?>
 <ArrayOfAccount>
   <Account Name="John" Sex="Male" Age="28" />
   <Account Name="Ram" Sex="Male" Age="22" />
 </ArrayOfAccount>

```

What output I need is

```
name[0]="John"
name[1]="Ram"

```

and So on...

I think this is enough to get an idea.