Ejemplo n.º 1
0
        public void LoadTemplate()
        {
            if (Parent == null || Parent.Templates == null || Parent.Templates.Count == 0)
            {
                return;
            }

            var templateAttribute = XmlRoot.Attribute("Template");

            if (templateAttribute == null)
            {
                return;
            }

            var templateName = templateAttribute.Value;

            if (string.IsNullOrWhiteSpace(templateName))
            {
                return;
            }

            if (!Parent.Templates.ContainsKey(templateName))
            {
                return;
            }

            _template = Parent.Templates[templateName];
        } // loadTemplate
Ejemplo n.º 2
0
        } // getXMLElement

        public XAttribute GetXMLAttribute(string name)
        {
            XAttribute att = null;

            if (_template != null)
            {
                att = _template.Attribute(name);
            }

            if (att == null)
            {
                att = XmlRoot.Attribute(name);
            }

            return(att);
        } // getXMLAttribute