public void Add(string order) { SecurityElement se; if (FileUtils.Exist(PathUtils.RechargeOrderPath) == false) { se = MonoXmlUtils.Create(); } else { se = MonoXmlUtils.LoadXmlSE(PathUtils.RechargeOrderPath); } SecurityElement item; bool found = false; if (se.Children != null) { for (int i = 0, count = se.Children.Count; i < count; ++i) { item = se.Children[i] as SecurityElement; if (item.Text.CompareTo(order) == 0) { found = true; } } } if (found == false) { MonoXmlUtils.Add(se, "order", order); MonoXmlUtils.SaveXml(PathUtils.RechargeOrderPath, se); } }