using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;


/// <summary>
/// xmlwebconfig 的摘要说明
/// </summary>
public class xmlwebconfig
{
	public xmlwebconfig()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}
    //取配置文件XML值

    public static string GetXMLvalue(string lx, string bintag, string childtag, string tag)
    {
        FileInfo XMLFile;
        XmlDocument xmldoc;
        string value = "";
        switch (lx)
        {
            #region 产品设置初始化
            case "pro":
                    xmldoc = new XmlDocument();
                    HttpServerUtility Server = HttpContext.Current.Server;
                    xmldoc.Load(Server.MapPath("~/App_Data/wtocustmersettoolxml.xml"));
                    XmlNodeList web = xmldoc.DocumentElement.ChildNodes;
                    foreach (XmlElement element in web)
                    {
                        if (element.Name == "pro")
                        {

                            XmlNodeList index = element.ChildNodes;
                            foreach (XmlElement elech in index)
                            {
                                switch (elech.Name.ToString())
                                {
                                    case "index":
                                        XmlNodeList elch = elech.ChildNodes;
                                        foreach (XmlElement zi in elch)
                                        {
                                            switch (zi.Name)
                                            {
                                                case "isn":
                                                    XmlNodeList x = zi.ChildNodes;
                                                    foreach (XmlNode c in x)
                                                    {
                                                        if (c.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement el = (XmlElement)c;
                                                            switch (el.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "hh")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "cou")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "style")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "ispicset")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "picw")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pich")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pnn":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pnn")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "phn":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "phn")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pprice":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pprice")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvipp":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pvipp")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pli":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pli")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pbuy":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pbuy")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pshow":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pshow")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pder":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pder")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pmakasname":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pmakasname")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvippname":
                                                                    if (bintag == "index" && childtag == "isn" && tag == "pvipname")
                                                                    {
                                                                        value = el.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;
                                                case "ish":
                                                    XmlNodeList x2 = zi.ChildNodes;
                                                    foreach (XmlNode c2 in x2)
                                                    {
                                                        if (c2.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement el2 = (XmlElement)c2;
                                                            switch (el2.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "hh")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "cou")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "style")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "ispicset")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "picw")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pich")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }
                                                                    break;

                                                                case "pnn":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pnn")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "phn":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "phn")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pprice":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pprice")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pvipp":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pvipp")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;

                                                                case "pli":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pli")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pbuy":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pbuy")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pshow":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pshow")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pder":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pder")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pmakasname":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pmakasname")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                                case "pvippname":
                                                                    if (bintag == "index" && childtag == "ish" && tag == "pvippname")
                                                                    {
                                                                        value = el2.Attributes["value"].Value;
                                                                    }

                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;
                                                case "ist":
                                                    XmlNodeList x3 = zi.ChildNodes;
                                                    foreach (XmlNode c3 in x3)
                                                    {
                                                        if (c3.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement el3 = (XmlElement)c3;
                                                            switch (el3.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "hh")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "cou")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "style")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "ispicset")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "picw")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pich")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pnn":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pnn")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "phn":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "phn")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pprice":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pprice")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvipp":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pvipp")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;

                                                                case "pli":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pli")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pbuy":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pbuy")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pshow":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pshow")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pder":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pder")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pmakasname":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pmakasname")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvippname":
                                                                    if (bintag == "index" && childtag == "ist" && tag == "pvippname")
                                                                    {
                                                                        value = el3.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;
                                                case "iss":
                                                    XmlNodeList x4 = zi.ChildNodes;
                                                    foreach (XmlNode c4 in x4)
                                                    {
                                                        if (c4.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement el4 = (XmlElement)c4;
                                                            switch (el4.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "hh")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "cou")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "style")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "ispicset")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "picw")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pich")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;

                                                                case "pnn":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pnn")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "phn":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "phn")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pprice":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pprice")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvipp":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pvipp")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;

                                                                case "pli":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pli")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pbuy":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pbuy")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pshow":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pshow")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pder":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pder")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pmakasname":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pmakasname")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvippname":
                                                                    if (bintag == "index" && childtag == "iss" && tag == "pvippname")
                                                                    {
                                                                        value = el4.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;
                                                case "isp":
                                                    XmlNodeList x5 = zi.ChildNodes;
                                                    foreach (XmlNode c5 in x5)
                                                    {
                                                        if (c5.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement el5 = (XmlElement)c5;
                                                            switch (el5.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "hh")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "cou")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "style")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "ispicset")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "picw")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pich")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;

                                                                case "pnn":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pnn")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "phn":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "phn")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pprice":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pprice")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvipp":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pvipp")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;

                                                                case "pli":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pli")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pbuy":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pbuy")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pshow":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pshow")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pder":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pder")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pmakasname":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pmakasname")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pvippname":
                                                                    if (bintag == "index" && childtag == "isp" && tag == "pvippname")
                                                                    {
                                                                        value = el5.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;

                                            }

                                        }
                                        break;
                                    case "inner":
                                        XmlNodeList inner = elech.ChildNodes;
                                        foreach (XmlElement ine in inner)
                                        {
                                            switch (ine.Name)
                                            {
                                                case "big":
                                                    XmlNodeList in1 = ine.ChildNodes;
                                                    foreach (XmlNode i1 in in1)
                                                    {
                                                        if (i1.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement ii1 = (XmlElement)i1;
                                                            switch (ii1.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "inner" && childtag == "big" && tag == "hh")
                                                                    {
                                                                        value = ii1.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "inner" && childtag == "big" && tag == "cou")
                                                                    {
                                                                        value = ii1.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "inner" && childtag == "big" && tag == "style")
                                                                    {
                                                                        value = ii1.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "inner" && childtag == "big" && tag == "ispicset")
                                                                    {
                                                                        value = ii1.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "inner" && childtag == "big" && tag == "picw")
                                                                    {
                                                                        value = ii1.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "inner" && childtag == "big" && tag == "pich")
                                                                    {
                                                                        value = ii1.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;
                                                case "small":
                                                    XmlNodeList in2 = ine.ChildNodes;
                                                    foreach (XmlNode i2 in in2)
                                                    {
                                                        if (i2.GetType() == typeof(System.Xml.XmlElement))
                                                        {
                                                            XmlElement ii2 = (XmlElement)i2;
                                                            switch (ii2.Attributes["key"].InnerXml)
                                                            {
                                                                case "hh":
                                                                    if (bintag == "inner" && childtag == "small" && tag == "hh")
                                                                    {
                                                                        value = ii2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "cou":
                                                                    if (bintag == "inner" && childtag == "small" && tag == "cou")
                                                                    {
                                                                        value = ii2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "style":
                                                                    if (bintag == "inner" && childtag == "small" && tag == "style")
                                                                    {
                                                                        value = ii2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "ispicset":
                                                                    if (bintag == "inner" && childtag == "small" && tag == "ispicset")
                                                                    {
                                                                        value = ii2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "picw":
                                                                    if (bintag == "inner" && childtag == "small" && tag == "picw")
                                                                    {
                                                                        value = ii2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                                case "pich":
                                                                    if (bintag == "inner" && childtag == "small" && tag == "pich")
                                                                    {
                                                                        value = ii2.Attributes["value"].Value;
                                                                    }
                                                                    break;
                                                            }
                                                        }
                                                    }
                                                    break;
                                            }
                                        }
                                        break;
                                }

                            }

                        }
                    }
                
                break;
            #endregion
            #region 新闻设置初始化
            case "news":
                    xmldoc = new XmlDocument();
                    HttpServerUtility server = HttpContext.Current.Server;
                
                    xmldoc.Load(server.MapPath("~/App_Data/wtocustmersettoolxml.xml"));
                    XmlNodeList web2 = xmldoc.DocumentElement.ChildNodes;
                    foreach (XmlElement element in web2)
                    {
                        if (element.Name == "new")
                        {

                            XmlNodeList index = element.ChildNodes;
                            foreach (XmlElement elech in index)
                            {
                                switch (elech.Name.ToString())
                                {
                                    case "indexnew":
                                        XmlNodeList elch = elech.ChildNodes;
                                        foreach (XmlNode zi in elch)
                                        {
                                            if (zi.GetType() == typeof(System.Xml.XmlElement))
                                            {
                                                XmlElement ne = (XmlElement)zi;
                                                switch (ne.Attributes["key"].Value)
                                                {
                                                    case "hc":
                                                        if (bintag == "indexnew" && tag == "hc")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "cou":
                                                        if (bintag == "indexnew" && tag == "cou")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "yicstyle":
                                                        if (bintag == "indexnew" && tag == "yicstyle")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "picisset":
                                                        if (bintag == "indexnew" && tag == "picisset")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "picw":
                                                        if (bintag == "indexnew" && tag == "picw")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "pich":
                                                        if (bintag == "indexnew" && tag == "pich")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "style":
                                                        if (bintag == "indexnew" && tag == "style")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;

                                                }
                                            }
                                        }
                                        break;
                                    case "innernews":
                                        XmlNodeList inner = elech.ChildNodes;
                                        foreach (XmlNode ine in inner)
                                        {
                                            if (ine.GetType() == typeof(System.Xml.XmlElement))
                                            {
                                                XmlElement ne = (XmlElement)ine;
                                                switch (ne.Attributes["key"].Value)
                                                {
                                                    case "hc":
                                                        if (bintag == "innernews" && tag == "hc")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "cou":
                                                        if (bintag == "innernews" && tag == "cou")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "yicstyle":
                                                        if (bintag == "innernews" && tag == "yicstyle")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "picisset":
                                                        if (bintag == "innernews" && tag == "picisset")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "picw":
                                                        if (bintag == "innernews" && tag == "picw")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "pich":
                                                        if (bintag == "innernews" && tag == "pich")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;
                                                    case "style":
                                                        if (bintag == "innernews" && tag == "style")
                                                        {
                                                            value = ne.Attributes["value"].Value;
                                                        }
                                                        break;

                                                }
                                            }
                                        }
                                        break;
                                }

                            }

                        }
                    }
                
                break;
            #endregion
            #region BBS设置初始化
            case "bbs":
                xmldoc = new XmlDocument();
                HttpServerUtility server2 = HttpContext.Current.Server;

                xmldoc.Load(server2.MapPath("~/App_Data/wtocustmersettoolxml.xml"));
                XmlNodeList web3 = xmldoc.DocumentElement.ChildNodes;
                foreach (XmlElement element2 in web3)
                {
                    if (element2.Name == "bbs")
                    {
                        XmlNodeList liyan = element2.ChildNodes;
                        foreach (XmlElement liy in liyan)
                        {
                            switch (liy.Name.ToString())
                            {
                                case "liyan":
                                    XmlNodeList elch2 = liy.ChildNodes;
                                    foreach (XmlNode zi2 in elch2)
                                    {
                                        if (zi2.GetType() == typeof(System.Xml.XmlElement))
                                        {
                                            XmlElement ne3 = (XmlElement)zi2;
                                            switch (ne3.Attributes["key"].Value)
                                            {
                                                case "hc":
                                                    if (bintag == "liyan" && tag == "hc")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;
                                                case "style":
                                                    if (bintag == "bigbbs" && tag == "style")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;
                                               

                                            }
                                        }
                                    }
                                    break;
                                case "bigbbs":
                                    XmlNodeList bigbbs = liy.ChildNodes;
                                    foreach (XmlNode iney in bigbbs)
                                    {
                                        if (iney.GetType() == typeof(System.Xml.XmlElement))
                                        {
                                            XmlElement ney = (XmlElement)iney;
                                            switch (ney.Attributes["key"].Value)
                                            {
                                                case "hc":
                                                    if (bintag == "bigbbs" && tag == "hc")
                                                    {
                                                        value = ney.Attributes["value"].Value;
                                                    }
                                                    break;
                                                case "cou":
                                                    if (bintag == "bigbbs" && tag == "style")
                                                    {
                                                        value = ney.Attributes["value"].Value;
                                                    }
                                                    break;
                                            }
                                        }
                                    }
                                    break;
                            }

                        }

                    }
                }

                break;
                           #endregion
            #region 案例设置初始化
            case "case":
                xmldoc = new XmlDocument();
                HttpServerUtility server4 = HttpContext.Current.Server;

                xmldoc.Load(server4.MapPath("~/App_Data/wtocustmersettoolxml.xml"));
                XmlNodeList web4 = xmldoc.DocumentElement.ChildNodes;
                foreach (XmlElement element2 in web4)
                {
                    if (element2.Name == "case")
                    {
                        XmlNodeList liyan = element2.ChildNodes;
                        foreach (XmlElement liy in liyan)
                        {
                            switch (liy.Name.ToString())
                            {
                                case "ny":
                                    XmlNodeList elch2 = liy.ChildNodes;
                                    foreach (XmlNode zi2 in elch2)
                                    {
                                        if (zi2.GetType() == typeof(System.Xml.XmlElement))
                                        {
                                            XmlElement ne3 = (XmlElement)zi2;
                                            switch (ne3.Attributes["key"].Value)
                                            {
                                                case "hc":
                                                    if (bintag == "ny" && tag == "hc")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;
                                                case "cou":
                                                    if (bintag == "ny" && tag == "cou")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;
                                                case "picisset":
                                                    if (bintag == "ny" && tag == "picisset")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;
                                                case "picw":
                                                    if (bintag == "ny" && tag == "picw")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;
                                                case "pich":
                                                    if (bintag == "ny" && tag == "pich")
                                                    {
                                                        value = ne3.Attributes["value"].Value;
                                                    }
                                                    break;


                                            }
                                        }
                                    }
                                    break;
                            }

                        }

                    }
                }

                break;
                            #endregion
        }

        return value;
    }
}
