/// <summary> /// </summary> /// /// <param name="node">node of xml header, body, footer, loop</param> /// <param name="footer">True if its a footer page element</param> /// <returns></returns> public RowGroup _buildRowGroup(XmlNode node, bool footer) { //20130606 :: jaimelopez RowGroup rowGroup = null; if (footer) { rowGroup = new FooterGroup(XmlHelper.GetAttributeBoolean(FooterGroup.AbsoluteAttribute, node.Attributes, false)); } else { rowGroup = new RowGroup(); } //-- rowGroup.Y = XmlHelper.GetFloatAttributeValue("y", node.Attributes, -1); XmlAttributeCollection _font = DefaultFontAttrs; if (node.FirstChild.Name == "font") { _font = node.FirstChild.Attributes; } XmlNodeList rowNodes = node.SelectNodes(".//row"); foreach (XmlNode rowNode in rowNodes) { if (rowNode.Name == "row") { rowGroup.AddRow(_buildRow(rowNode, _font)); } } return(rowGroup); }
/// <summary> /// </summary> /// /// <param name="node">node of xml header, body, footer, loop</param> /// <param name="footer">True if its a footer page element</param> /// <returns></returns> private RowGroup _buildRowGroup(XmlNode node, bool footer) { //20130606 :: jaimelopez RowGroup rowGroup = null; if (footer) { rowGroup = new FooterGroup(PDFDraw.Helper.GetAttributeBoolean(FooterGroup.AbsoluteAttribute, node.Attributes, false)); } else { rowGroup = new RowGroup(); } //-- rowGroup.Y = PDFDraw.Helper.GetFloatAttributeValue("y", node.Attributes, -1); XmlAttributeCollection _font = DefaultFontAttrs; if (node.FirstChild.Name == "font") { _font = node.FirstChild.Attributes; } XmlNodeList rowNodes = node.SelectNodes(".//row"); foreach (XmlNode rowNode in rowNodes) { if(rowNode.Name == "row") rowGroup.AddRow(_buildRow(rowNode, _font)); } return rowGroup; }