Пример #1
0
        public static CssVariable CreateFromXmlNode(XmlNode node)
        {
            CssVariable var = new CssVariable();

            if (node.Attributes["name"] != null)
                var.Name = node.Attributes["name"].Value;

            var.DefaultValue = node.InnerText;

            return var;
        }
Пример #2
0
        public static CssVariable CreateFromXmlNode(XmlNode node)
        {
            CssVariable var = new CssVariable();

            if (node.Attributes["name"] != null)
            {
                var.Name = node.Attributes["name"].Value;
            }

            var.DefaultValue = node.InnerText;

            return(var);
        }
Пример #3
0
        public static EmbeddedCss CreateFromXmlNode(XmlNode node)
        {
            EmbeddedCss css = new EmbeddedCss();

            if (node.Attributes["targetfile"] != null)
            {
                css.TargetFile = node.Attributes["targetfile"].Value;
            }

            if (node.SelectSingleNode("Content") != null)
            {
                css.Content = node.SelectSingleNode("Content").InnerText;
            }


            foreach (XmlNode variableNode in node.SelectNodes("Variables/Variable"))
            {
                css.Variables.Add(CssVariable.CreateFromXmlNode(variableNode));
            }

            return(css);
        }