public static Component CreateFromXml(XmlElement element)
        {
            Component l_Comp;
            string    xmltype = element.Attributes["type"].InnerText;

            if (xmltype == "msi")
            {
                l_Comp = new ComponentMsi();
            }
            else if (xmltype == "msu")
            {
                l_Comp = new ComponentMsu();
            }
            else if (xmltype == "msp")
            {
                l_Comp = new ComponentMsp();
            }
            else if (xmltype == "cmd")
            {
                l_Comp = new ComponentCmd();
            }
            else if (xmltype == "openfile")
            {
                l_Comp = new ComponentOpenFile();
            }
            else if (xmltype == "exe")
            {
                l_Comp = new ComponentExe();
            }
            else
            {
                throw new Exception(string.Format("Invalid type: {0}", xmltype));
            }

            l_Comp.FromXml(element);

            return(l_Comp);
        }
        public static Component CreateFromXml(XmlElement element)
        {
            Component l_Comp;
            string xmltype = element.Attributes["type"].InnerText;
            if (xmltype == "msi")
                l_Comp = new ComponentMsi();
            else if (xmltype == "msu")
                l_Comp = new ComponentMsu();
            else if (xmltype == "msp")
                l_Comp = new ComponentMsp();
            else if (xmltype == "cmd")
                l_Comp = new ComponentCmd();
            else if (xmltype == "openfile")
                l_Comp = new ComponentOpenFile();
            else if (xmltype == "exe")
                l_Comp = new ComponentExe();
            else
                throw new Exception(string.Format("Invalid type: {0}", xmltype));

            l_Comp.FromXml(element);

            return l_Comp;
        }