Пример #1
0
        public XmlShortcutFile(string filePath)
        {
            _doc = new XmlDocument();
            _doc.Load(filePath);

            _globalMacros = new XmlMacroCollection();

            _globalMacros.AddMacros(_doc.DocumentElement);
        }
Пример #2
0
        /**
         * Recursively add the node and his template's macros
         */
        void AddTemplateMacros(XmlNode node, XmlMacroCollection macros)
        {
            var templateNode = GetNodeTemplate(node, macros);

            if (templateNode != null)
            {
                AddTemplateMacros(templateNode, macros);
            }

            macros.AddMacros(node);
        }