void ParseUsers(PDModel m, XmlNode root) { foreach (XmlNode userNode in root.ChildNodes) { PDUser user = new PDUser(); user.Model = m; user.ID = userNode.Attributes["Id"].Value; foreach (XmlNode node in userNode.ChildNodes) { switch (node.Name) { case "a:Name": user.Name = node.InnerText; break; case "a:Code": user.Code = node.InnerText; break; case "a:Comment": user.Comment = node.InnerText; break; default: user.AddUnparsedNode(node); break; } }//end parse user m.AddUser(user); }//end parse users }
public void AddUser(PDUser user) { _UserList.Add(user); }