Ejemplo n.º 1
0
        public static CT_Stylesheet Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Stylesheet ctObj = new CT_Stylesheet();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "numFmts")
                {
                    ctObj.numFmts = CT_NumFmts.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "fonts")
                {
                    ctObj.fonts = CT_Fonts.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "fills")
                {
                    ctObj.fills = CT_Fills.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "borders")
                {
                    ctObj.borders = CT_Borders.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "cellStyleXfs")
                {
                    ctObj.cellStyleXfs = CT_CellStyleXfs.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "cellXfs")
                {
                    ctObj.cellXfs = CT_CellXfs.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "cellStyles")
                {
                    ctObj.cellStyles = CT_CellStyles.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "dxfs")
                {
                    ctObj.dxfs = CT_Dxfs.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "tableStyles")
                {
                    ctObj.tableStyles = CT_TableStyles.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "colors")
                {
                    ctObj.colors = CT_Colors.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Ejemplo n.º 2
0
 public static CT_CellStyles Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_CellStyles ctObj = new CT_CellStyles();
     ctObj.count = XmlHelper.ReadUInt(node.Attributes["count"]);
     ctObj.cellStyle = new List<CT_CellStyle>();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "cellStyle")
             ctObj.cellStyle.Add(CT_CellStyle.Parse(childNode, namespaceManager));
     }
     return ctObj;
 }
Ejemplo n.º 3
0
        public static CT_CellStyles Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_CellStyles ctObj = new CT_CellStyles();

            ctObj.count     = XmlHelper.ReadUInt(node.Attributes["count"]);
            ctObj.cellStyle = new List <CT_CellStyle>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "cellStyle")
                {
                    ctObj.cellStyle.Add(CT_CellStyle.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }