public static CT_Stylesheet Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Stylesheet ctObj = new CT_Stylesheet(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "numFmts") { ctObj.numFmts = CT_NumFmts.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "fonts") { ctObj.fonts = CT_Fonts.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "fills") { ctObj.fills = CT_Fills.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "borders") { ctObj.borders = CT_Borders.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "cellStyleXfs") { ctObj.cellStyleXfs = CT_CellStyleXfs.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "cellXfs") { ctObj.cellXfs = CT_CellXfs.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "cellStyles") { ctObj.cellStyles = CT_CellStyles.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "dxfs") { ctObj.dxfs = CT_Dxfs.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "tableStyles") { ctObj.tableStyles = CT_TableStyles.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "colors") { ctObj.colors = CT_Colors.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "extLst") { ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_NumFmts Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_NumFmts ctObj = new CT_NumFmts(); ctObj.count = XmlHelper.ReadUInt(node.Attribute("count")); ctObj.numFmt = new List <CT_NumFmt>(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "numFmt") { ctObj.numFmt.Add(CT_NumFmt.Parse(childNode, namespaceManager)); } } return(ctObj); }