public void Load(XmlElement xmlElem) { XmlNodeList nodes = xmlElem.GetElementsByTagName("point"); for (int i = 0; i < nodes.Count; i++) { XmlNode node = nodes[i]; if (node is XmlElement) { XmlElement nodeElem = (XmlElement)node; PricePoint point = new PricePoint(); point.Load(nodeElem); this.points.Add(point); } } if (xmlElem.HasAttribute("width")) { this.Width = int.Parse(xmlElem.GetAttribute("width")); } if (xmlElem.HasAttribute("color")) { this.Color = ColorTranslator.FromHtml(xmlElem.GetAttribute("color")); } }