public override void Load(System.Xml.XmlNode element) { base.Load(element); XmlNodeList nodes = element.SelectNodes("Header"); if (nodes.Count == 1) { // TODO: Load header foreach (XmlNode node in nodes[0].ChildNodes) { if (node.Name == "TemplateInfo") { try { this.Title = node.Attributes["Title"].Value; this.Author = node.Attributes["Author"].Value; this.Subject = node.Attributes["Subject"].Value; this.producer = node.Attributes["Producer"].Value; } catch { this.Title = "Untitled"; this.Author = "Unnamed"; this.Subject = "No Subject"; this.producer = "AxiomCoders PdfReports (www.axiomcoders.com)"; } } } } // Load data streams nodes = element.SelectNodes("DataStreams"); if (nodes.Count == 1) { foreach (XmlNode node in nodes[0].ChildNodes) { if (node.Name == "DataStream") { DataStream ds = new DataStream(); ds.Load(node); this.DataStreams.Add(ds); } } } // load fonts if they exists XmlNode fontsNode = element.SelectSingleNode("Fonts"); if (fontsNode != null) { FontManager.Instance.Load(fontsNode); } // load Page nodes = element.SelectNodes("Page"); if (nodes.Count == 1) { ReportPage.Load(nodes[0]); } }