private void init() { if (!isXmlConfigFileExist()) { MessageBox.Show(xmlFile + " not found."); return; } XmlTextReader reader = new XmlTextReader(xmlFile); while (reader.Read()) { if (String.Compare(reader.Name, "account") == 0) { String account = reader.GetAttribute("value"); accounts.Add(account); AttributeTable aTable = new AttributeTable(); while (reader.MoveToNextAttribute()) { String aName = reader.Name; String aValue = reader.Value; aTable.put(aName, aValue); //MessageBox.Show(account + ":" + aName + ":" + aValue); } attributeTables.Add(account, aTable); } } }
public String getAccountAttribute(String aAccount, String aAttributeName) { AttributeTable attributeTable = attributeTables[aAccount]; return(attributeTable.get(aAttributeName)); }