AvalonGUIConfig.SkinInfo.readMPConfiguration C# (CSharp) Method

readMPConfiguration() private method

private readMPConfiguration ( string sectionName, string entryName ) : string
sectionName string
entryName string
return string
        string readMPConfiguration(string sectionName, string entryName)
        {
            string fMPdirs = mpPaths.configBasePath + "MediaPortal.xml";
            XmlDocument doc = new XmlDocument();
            if (!File.Exists(fMPdirs))
            {
                MessageBox.Show("Can't find MediaPortal.xml \r\r" + fMPdirs);
                return null;
            }
            doc.Load(fMPdirs);
            XmlNodeList nodeList = doc.DocumentElement.SelectNodes("/profile/section");
            foreach (XmlNode node in nodeList)
            {
                XmlNode innerNode = node.Attributes.GetNamedItem("name");
                if (innerNode.InnerText == sectionName)
                {
                    XmlNode path = node.SelectSingleNode("entry[@name=\"" + entryName + "\"]");
                    if (path != null)
                    {
                        entryName = path.InnerText;
                        return entryName;
                    }
                }
            }
            return string.Empty;
        }