xmlDocument怎么遍历

xmlDocument如何遍历?如何遍历xmlDocument中流的内容譬如我要找每个节点中aaa的innerText[解决办法]C# c

xmlDocument如何遍历?
如何遍历xmlDocument中流的内容
譬如
我要找每个节点中<aaa>的innerText

[解决办法]

C# code
    using System.Xml;    public IList GetCollection()    {        ArrayList aaaCollection = new ArrayList();        XmlDocument doc = new XmlDocument();        doc.Load("xml文件路径");        XmlNodeList nodeList = doc.GetElementsByTagName("aaa"); //获取aaa节点集合        foreach (XmlNode node in nodeList)        {            aaaCollection.Add(node.InnerText);        }        return aaaCollection;    }