Beispiel #1
0
 public static string ExportData(string CpicIds, string ColNames, string NodeId, string type, string FileType)
 {
     try
     {
         SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
         CpicIds = CpicIds.Replace(",undefined,", ",");
         List<int> listNo = CpicIds.Trim(',').Split(',').ToList<string>().ConvertAll<int>(x => Convert.ToInt32(x));
         List<xmlDataInfo> listXml = search.GetResult(listNo, type.ToUpper());
         string name = GlobalUtility.TimeRandomName() + "." + FileType;
         string strFileName = "/Images/Export/Patent" + name;
         string fullpath = System.Web.HttpContext.Current.Server.MapPath(strFileName);
         if (!Directory.Exists(Path.GetDirectoryName(fullpath)))
         {
             Directory.CreateDirectory(Path.GetDirectoryName(fullpath));
         }
         ExcelLib.NPOIHelper eh = new ExcelLib.NPOIHelper();
         fullpath = eh.DataTable2File(List2DataTable(listXml, ColNames, type, NodeId), fullpath, FileType);
         return name;
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString());
         return "";
     }
 }
Beispiel #2
0
        /// <summary>
        /// 中国专利法律状态检索
        /// </summary>
        private void RefGrvFL()
        {
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            SearchInterface.WSFLZT.CnLegalStatus[] currentDataSet = search.getFalvZhuangTai(Request.QueryString["idx"]);

            GridView1.DataSource = currentDataSet;
            GridView1.DataBind();
        }
Beispiel #3
0
        public static string[] getDes(string Ids, string _type)
        {
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            StringBuilder sb = new StringBuilder();
            string[] lst = new string[2];
            if (!string.IsNullOrEmpty(Ids))
            {
                if (string.IsNullOrEmpty(_type))
                {
                    return null;
                }

                //sb.Append(" <table cellspacing='1' class='compare'>");
                //sb.Append("<tr>");
                //sb.Append("<td width='49%' style='border-right: #6595d6 1px solid;'>");

                //LiteralRights.Text = search.getInfoByPatentID(Request.QueryString["Id"], "CN", "0");
                string[] arrayId = Ids.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                string xmltext = search.getInfoByPatentID(arrayId[0].ToString(), _type, "1");
                MSXML2.DOMDocument30Class xml = new MSXML2.DOMDocument30Class();
                MSXML2.DOMDocument30Class xslt = new MSXML2.DOMDocument30Class();
                xml.loadXML(xmltext);

                XmlDocument doc = new XmlDocument();
                doc.Load(System.Web.HttpContext.Current.Server.MapPath("~") + "\\newcss\\des.xsl");
                string xsltext = doc.InnerXml;

                xslt.loadXML(xsltext);
                string claimsA = xml.transformNode(xslt).Replace("charset=UTF-16", "charset=GB2312");
                int start = claimsA.IndexOf("<table");
                int end = claimsA.IndexOf("</table>") - start + 8;
                claimsA = claimsA.Substring(start, end);
                //{["name":"张三","age":18],["name":"李四","age":19]}
                //sb.Append("{[ClaimsA:");
                //sb.Append(claimsA);
                //sb.Append("],[ClaimsB:");
                //sb.Append("</td>");
                //sb.Append("<td>");
                xmltext = search.getInfoByPatentID(arrayId[1].ToString(), _type, "1");
                xml = new MSXML2.DOMDocument30Class();
                xml.loadXML(xmltext);

                string claimsB = xml.transformNode(xslt).Replace("charset=UTF-16", "charset=GB2312");
                start = claimsB.IndexOf("<table");
                end = claimsB.IndexOf("</table>") - start + 8;
                claimsB = claimsB.Substring(start, end);
                //sb.Append(claimsB);
                //sb.Append("]}");
                //sb.Append("</td>");
                //sb.Append("</tr>");
                //sb.Append("</table>");
                //Response.Write(sb.ToString());
                lst[0] = claimsA.Replace("document.write(", "//document.write(");
                lst[1] = claimsB.Replace("document.write(", "//document.write(");
            }
            return lst;
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            divNoImg.Visible = false;
            if (Request.QueryString["Id"] != null && Request.QueryString["Id"] != "")
            {
                SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                string strLiTmp = " <li><a href='{0}' target='_blank'><img src='{0}' height='80' alt='外观图片' onerror='imgOnError(this)' /></a></li>";

                string strImageUrls = search.getInfoByPatentID(Request.QueryString["Id"], "CN", "4");
                string[] arrayImageUrl = strImageUrls.Split(new string[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
                if (arrayImageUrl.Length > 0)
                {
                    //ImagePicture.ImageUrl = arrayImageUrl[0];
                    string strTmpUrl = "";
                    foreach (string strUrlItem in arrayImageUrl)
                    {
                        ////http://search.patentstar.com.cn/CPRS2010/CNDegImg/2929/2013300887967/000003.JPG
                        //strTmpUrl = strUrlItem.Substring(strUrlItem.ToUpper().IndexOf("CNDEGIMG/") + 9);
                        //strTmpUrl = Cpic.Cprs2010.Cfg.UrlParameterCode_DE.encrypt(strTmpUrl);
                        //strTmpUrl = string.Format("http://202.106.92.181/cprs2010/comm/getimg.aspx?idx={0}&Ty=CWGF", strTmpUrl);

                        //litDesigImgsLi.Text += "<img src=\"" + arrayImageUrl[i] + "\" height=\"80\" onclick=\"showImg('" + arrayImageUrl[i] + "')\" alt=\"\" style=\"border:solid 1px #BDBDBD; margin:20px; cursor:pointer;\"/> ";
                        strTmpUrl = strUrlItem;
                        litDesigImgsLi.Text += string.Format(strLiTmp, strTmpUrl);
                    }
                }
                else
                {
                    divZoomBox.Visible = false;
                    divNoImg.Visible = true;
                }
            }
            else
            {
                divZoomBox.Visible = false;
                divNoImg.Visible = true;
            }
        }
Beispiel #5
0
        public ResultInfoWebService Search(string strPattern, int UserID, int nSNo, SearchDbType _SDbType)
        {
            SearchPattern schPatItem = new Cpic.Cprs2010.Search.SearchPattern();

            schPatItem.SearchNo = nSNo.ToString().PadLeft(3, '0');  //检索编号
            schPatItem.Pattern = strPattern;      //检索式:F XX 2010/AD
            schPatItem.UserId = UserID;   //用户ID
            schPatItem.DbType = _SDbType;

            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            ResultInfo res = search.DoSearch(SearchInterface.XmPatentComm.strWebSearchGroupName, strPattern, Convert.ToInt32(UserID), schPatItem.SearchNo, _SDbType);

            // Cpic.Cprs2010.Search.ResultInfo res = Cpic.Cprs2010.Search.SearchManager.SearchFactory.CreatDoSearch(schPatItem);

            ResultInfoWebService resultInfoWebService = new ResultInfoWebService();
            resultInfoWebService.ResultInfo = res;

            ResultServices result = new ResultServices();
            string resultFilePath = result.getResultFilePath(schPatItem);
            resultInfoWebService.ResultSearchFilePath = resultFilePath;

            return resultInfoWebService;
        }
Beispiel #6
0
        /// <summary>
        /// 导入世界专利号单,生成cnp文件
        /// </summary>
        /// <param name="strTxt">号单文件路径</param>
        /// <param name="UName">用户ID</param>
        /// <param name="strSearchNo">检索编号</param>
        /// <param name="SearchDbType">数据源: Cn/DocDB</param>
        /// <returns></returns>
        private ResultInfo ImportLis2tResult_DocDB( string strTxt, int UName,string strSearchNo, SearchDbType SearchDbType )
        {
            Cpic.Cprs2010.Search.ResultInfo res = new ResultInfo ();

            if ( !File.Exists (strTxt) )
            {
                return res;
            }

            #region 生成cnp目录

            string ConfigCC = ConfigurationManager.AppSettings["CnpCC"].ToString ();
            string ConfigCCCount = ConfigurationManager.AppSettings["CnpCCCount"].ToString ();
            AryCC = ConfigCC.Split ('|');
            AryCnpCount =  ConfigCCCount.Split ('|');
            //Dictionary<string, string> dict = new Dictionary<string, string> ();

            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch ();
            //ResultInfo res = search.DoSearch ("", Convert.ToInt32 (UName), SearchDbType);
            string SearchNo = strSearchNo;// res.SearchPattern.SearchNo.ToString ();
            string strPath = CprsConfig.GetUserPath (Convert.ToInt32 (UName),XmPatentComm.strWebSearchGroupName);

            if ( !strPath.EndsWith (@"\") )
            {
                strPath += @"\";
            }

            cnpPath = strPath + Enum.GetName (typeof (SearchDbType), SearchDbType).ToUpper () + @"\" + "Set" + SearchNo + @"\";

            foreach ( string s in AryCC )
            {
                cnpFilePathDocDB = cnpPath + s + @"\";

                if ( !System.IO.Directory.Exists (cnpFilePathDocDB) )
                {
                    System.IO.Directory.CreateDirectory (cnpFilePathDocDB);
                }
            }

            #endregion

            #region 生成cnp空文件

            for ( int i = 0; i < AryCC.Length; i++ )
            {
                int CnpCountCC = Convert.ToInt16 (AryCnpCount[i]);
                for ( int j = 1; j <= CnpCountCC; j++ )
                {
                    string strCnpName = "00000" + Convert.ToString (j);
                    strCnpName = strCnpName.Substring (strCnpName.Length - 5, 5) + ".CNP";

                    strCnpName = cnpPath + AryCC[i] + @"\" + strCnpName;

                    //if ( !File.Exists (strCnpName) )
                    //{
                    //    File.Create (strCnpName).Close (); ;
                    //}

                    if ( File.Exists (strCnpName) )
                    {
                        File.Delete (strCnpName);
                    }

                    File.Create (strCnpName).Close ();
                }
            }

            #endregion

            #region 从文本中读号单在数据库中查询
            List<string> txtlist = new List<string> ();//文本中号单
            //{ "CH", "CN", "DE", "EP", "FR", "GB", "JP", "KR", "OT", "RU", "US","WO" };
            List<int> hitlistCH = new List<int> ();//命中号单
            List<int> hitlistCN = new List<int> ();//命中号单
            List<int> hitlistDE = new List<int> ();//命中号单
            List<int> hitlistEP = new List<int> ();//命中号单
            List<int> hitlistFR = new List<int> ();//命中号单
            List<int> hitlistGB = new List<int> ();//命中号单
            List<int> hitlistJP = new List<int> ();//命中号单
            List<int> hitlistKR = new List<int> ();//命中号单
            List<int> hitlistOT = new List<int> ();//命中号单
            List<int> hitlistRU = new List<int> ();//命中号单
            List<int> hitlistUS = new List<int> ();//命中号单
            List<int> hitlistWO = new List<int> ();//命中号单
            txtlist = ReadText2List (strTxt);
            txtlist.Sort ();
            int hitCount = 0;
            foreach ( var x in txtlist )
            {
                string PubNo = FormatPubNo (x);
                string txtCC = x.Substring (0, 2).ToString ();
                string strSQLCC = "";
                if ( Array.IndexOf (AryCC, txtCC) >= 0 )//在国家数组里存在
                {
                    strSQLCC = "[DataInfo].[dbo].[DocdbDocInfo_" + txtCC + "]";
                }
                else
                {
                    strSQLCC = "[DataInfo].[dbo].[DocdbDocInfo_OT]";
                }

                DataTable dt = new DataTable ();
                string SQL = "select ID  sid from " + strSQLCC + "  where docid =(select id from [DataInfo].[dbo].[DocdbDocInfo] where PubID=@PubID )";

                SqlParameter[] parms =
                    new SqlParameter[1] { new System.Data.SqlClient.SqlParameter ("@PubID", SqlDbType.NVarChar, 16) };
                parms[0].Value = PubNo.Trim ();
                dt = SqlDbAccess.GetDataTable (CommandType.Text, SQL, parms);
                if ( dt == null || dt.Rows.Count == 0 )
                {
                    //记录日志
                    string cnpPath1 = strPath + Enum.GetName (typeof (SearchDbType), SearchDbType).ToUpper () + @"\";
                    WriteLog (cnpPath1 + SearchNo + "_no.txt", x);
                }
                else
                {
                    int it = Convert.ToInt32 (dt.Rows[0][0].ToString ());

                    //{ "CH", "CN", "DE", "EP", "FR", "GB", "JP", "KR", "OT", "RU", "US","WO" };
                    //保存数组
                    switch ( txtCC )
                    {
                        case "CH":
                            hitlistCH.Add (it);
                            break;
                        case "CN":
                            hitlistCN.Add (it);
                            break;
                        case "DE":
                            hitlistDE.Add (it);
                            break;
                        case "EP":
                            hitlistEP.Add (it);
                            break;
                        case "FR":
                            hitlistFR.Add (it);
                            break;
                        case "GB":
                            hitlistGB.Add (it);
                            break;
                        case "JP":
                            hitlistJP.Add (it);
                            break;
                        case "KR":
                            hitlistKR.Add (it);
                            break;
                        case "RU":
                            hitlistRU.Add (it);
                            break;
                        case "US":
                            hitlistUS.Add (it);
                            break;
                        case "WO":
                            hitlistWO.Add (it);
                            break;
                        default:
                            hitlistOT.Add (it);
                            break;
                    }
                    hitCount++;

                }

            }

            //hitlistCH.Add (500003);
            //hitlistCH.Add (300003);
            //hitlistCH.Add (700003);

            //hitlistEP.Add (4000334);
            //hitlistEP.Add (4000834);
            //hitlistEP.Add (4000134);
            //hitlistEP.Add (40134);

            //hitlistWO.Add (1000003);
            //hitlistWO.Add (200003);
            //hitlistWO.Add (100003);
            //hitlistWO.Add (1000018);
            //hitlistWO.Add (1000020);

            hitlistCH.Sort ();
            hitlistCN.Sort ();
            hitlistDE.Sort ();
            hitlistEP.Sort ();
            hitlistFR.Sort ();
            hitlistGB.Sort ();
            hitlistJP.Sort ();
            hitlistKR.Sort ();
            hitlistOT.Sort ();
            hitlistUS.Sort ();
            hitlistWO.Sort ();
            hitlistRU.Sort ();

            #endregion

            #region 保存为cnp文件

            //{ "CH", "CN", "DE", "EP", "FR", "GB", "JP", "KR", "OT", "RU", "US","WO" };
            Save2Cnp (hitlistCH,"CH");
            Save2Cnp (hitlistCN, "CN");
            Save2Cnp (hitlistDE, "DE");
            Save2Cnp (hitlistEP, "EP");
            Save2Cnp (hitlistFR, "FR");
            Save2Cnp (hitlistGB, "GB");
            Save2Cnp (hitlistJP, "JP");
            Save2Cnp (hitlistKR, "KR");
            Save2Cnp (hitlistOT, "OT");
            Save2Cnp (hitlistRU, "RU");
            Save2Cnp (hitlistUS, "US");
            Save2Cnp (hitlistWO, "WO");

            #endregion

            int i1 = strTxt.LastIndexOf (@"\");
            int i2 = strTxt.LastIndexOf (@"/");
            string strTxtName = "";
            if ( i1 >= 0 )
            {
                strTxtName = strTxt.Substring (i1+1);
            }
            if ( i2 >= 0 )
            {
                strTxtName = strTxt.Substring (i2 + 1);
            }
            Cpic.Cprs2010.Search.SearchPattern schPatItem = new Cpic.Cprs2010.Search.SearchPattern ();

            schPatItem.SearchNo = strSearchNo.PadLeft (3, '0');  //检索编号[001-999]
            schPatItem.Pattern = strTxtName;      //检索式:txt文件名
            schPatItem.UserId = UName;   //用户ID
            schPatItem.DbType = SearchDbType;

            res.SearchPattern = schPatItem;
            res.HitMsg = string.Format("({0})F XX {1} <hits:{2}>", schPatItem.SearchNo, strTxtName, hitCount);
            res.HitCount = hitCount;

            return res;
        }
Beispiel #7
0
        /// <summary>
        /// 导入中文号单,生成cnp文件
        /// </summary>
        /// <param name="strTxt">文件路径</param>
        /// <param name="UName">用户名</param>
        /// <param name="strSearchNo">检索编号</param>
        /// <param name="SearchDbType">数据源 CN/DocDB</param>
        /// <returns></returns>
        private ResultInfo ImportLis2tResult_CN( string strTxt, int UName,string strSearchNo, SearchDbType SearchDbType )
        {
            Cpic.Cprs2010.Search.ResultInfo res = new ResultInfo ();

            if ( !File.Exists (strTxt) )
            {
                return res;
            }

            #region 生成cnp的目录

            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch ();

            string SearchNo = strSearchNo;//136
            //\\192.168.131.10\VPath\User_Search_Base\1\000\066
            //\\192.168.131.10\VPath\User_Search_Base\1\000\066\CN\Set136\

            string strPath = CprsConfig.GetUserPath (Convert.ToInt32 (UName),XmPatentComm.strWebSearchGroupName);

            if ( !strPath.EndsWith (@"\") )
            {
                strPath += @"\";
            }

            cnpPath = strPath + Enum.GetName (typeof (SearchDbType), SearchDbType).ToUpper () + @"\" + "Set" + SearchNo + @"\";

            if ( !System.IO.Directory.Exists (cnpPath) )
            {
                System.IO.Directory.CreateDirectory (cnpPath);
            }

            #endregion

            #region 从文本中读号单在数据库中查询

            string SQL = "";
            List<string> txtlist = new List<string> ();//文本中号单
            List<int> hitlist = new List<int> ();//命中号单
            txtlist = ReadText2List (strTxt);
            txtlist.Sort ();
            int hitCount=0;
            foreach ( var x in txtlist )
            {
                string apno = FormatApno (x);//去掉校验位和CN
                DataTable dt = new DataTable ();
                SQL = "select SerialNo from [DataInfo].[dbo].[CnGeneral_Info] where ApNo=@ApNo";

                SqlParameter[] parms =
                    new SqlParameter[1] { new System.Data.SqlClient.SqlParameter ("@ApNo", SqlDbType.NVarChar, 16) };
                parms[0].Value = apno.Trim ();
                dt = SqlDbAccess.GetDataTable (CommandType.Text, SQL, parms);
                if ( dt == null || dt.Rows.Count == 0 )
                {
                    //记录日志
                    string cnpPath1 = strPath + Enum.GetName (typeof (SearchDbType), SearchDbType).ToUpper () + @"\";
                    WriteLog (cnpPath1 + SearchNo + "_no.txt", x);
                }
                else
                {
                    //保存数组
                    hitlist.Add (Convert.ToInt32 (dt.Rows[0]["SerialNo"].ToString ()));
                    hitCount++;

                }
            }

            #endregion

            #region 生成空cnp文件

            if ( hitlist.Count > 0 )
            {
                for ( int i = 1; i <= CnpCountCN; i++ )
                {
                    string strCnpName = "00000" + Convert.ToString (i);
                    strCnpName = strCnpName.Substring (strCnpName.Length - 5, 5) + ".CNP";

                    strCnpName = cnpPath + strCnpName;
                    if ( File.Exists (strCnpName) )
                    {
                        File.Delete (strCnpName);
                    }

                    File.Create (strCnpName).Close ();

                }
                hitlist.Sort ();
            }

            #endregion

            #region 保存为cnp文件

            int cnp1 = 0;

            List<int> cnplist = new List<int> ();
            int j = 0;
            cnp1 = hitlist[0] / 500000 + 1;

            foreach ( var y in hitlist )
            {
                int cnp = y / 500000 + 1;

                if ( j == 0 )
                {
                    cnplist.Add (Convert.ToInt32 (y));
                }
                else
                {
                    if ( cnp != cnp1 )//下一个cnp文件
                    {
                        InsertCNP (cnp1, cnplist);
                        cnplist.Clear ();
                        cnp1 = cnp;
                        cnplist.Add (y);
                        continue;

                    }

                    cnplist.Add (y);
                    cnp1 = cnp;
                }

                j++;
            }

            InsertCNP (cnp1, cnplist);

            #endregion

            #region 返回的参数

            int i1 = strTxt.LastIndexOf (@"\");
            int i2 = strTxt.LastIndexOf (@"/");
            string strTxtName = "";
            if ( i1 >= 0 )
            {
                strTxtName = strTxt.Substring (i1 + 1);
            }
            if ( i2 >= 0 )
            {
                strTxtName = strTxt.Substring (i2 + 1);
            }

            Cpic.Cprs2010.Search.SearchPattern schPatItem = new Cpic.Cprs2010.Search.SearchPattern ();

            schPatItem.SearchNo = strSearchNo.PadLeft (3, '0');  //检索编号[001-999]
            schPatItem.Pattern = strTxtName;      //检索式:txt文件名
            schPatItem.UserId = UName;   //用户ID
            schPatItem.DbType = SearchDbType;

            res.SearchPattern = schPatItem;
            res.HitMsg = string.Format("({0})F XX {1} <hits:{2}>",schPatItem.SearchNo,strTxtName,hitCount);
            res.HitCount = hitCount;

            #endregion
            return res;
        }
Beispiel #8
0
        public static string ExportData2(string type, string db, string id, string ColNames, string beginNum, string endNum, string strSort, string FileType)
        {
            try
            {
                int userid = Convert.ToInt32(System.Web.HttpContext.Current.Session["UserID"]);
                int bnum = Convert.ToInt32(beginNum) - 1;
                if (bnum < 0) bnum = 0;
                int endnum = Convert.ToInt32(endNum);
                int length = endnum - bnum;
                SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
                List<string> strcolnames = ColNames.Split('|').ToList<string>();
                List<int> listNo;
                List<int> fResult = new List<int>();
                switch (type.ToUpper())
                {
                    case "FI":
                    case "CN":
                    case "EN":
                        SearchPattern sp = new SearchPattern();
                        sp.SearchNo = id;
                        sp.Pattern = "";
                        if (db.ToUpper() == "CN")
                        {
                            sp.DbType = SearchDbType.Cn;
                        }
                        else
                        {
                            sp.DbType = SearchDbType.DocDB;
                        }
                        sp.UserId = userid;
                        ResultServices res = new ResultServices();
                        fResult = res.GetResultList(sp, "");
                        break;
                    case "ZT":
                    case "QY":
                        fResult = ztHelper.GetResultList(id, db);
                        break;
                    case "CO":
                        fResult = UserCollectsHelper.GetResultList(db, Convert.ToInt32(id));
                        break;
                    case "YJ0":
                    case "YJ1":
                        fResult = ProYJDLL.YJDB.getYJItemByWID(Convert.ToInt32(id), Convert.ToInt16(type.Substring(2).ToString()));
                        break;
                }

                listNo = fResult.Skip(bnum).Take(length).ToList<int>();
                List<xmlDataInfo> listXml = search.GetResult(listNo, db.ToUpper());
                string name = GlobalUtility.TimeRandomName() + "." + FileType;
                string strFileName = "/Images/Export/Patent" + name;
                string fullpath = System.Web.HttpContext.Current.Server.MapPath(strFileName);
                if (!Directory.Exists(Path.GetDirectoryName(fullpath)))
                {
                    Directory.CreateDirectory(Path.GetDirectoryName(fullpath));
                }
                ExcelLib.NPOIHelper eh = new ExcelLib.NPOIHelper();

                fullpath = eh.DataTable2File(List2DataTable(listXml, ColNames, type, ""), fullpath, FileType);

                return name;
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
                return "";
            }
        }
Beispiel #9
0
        public static string getSingleDes(string Id, string type)
        {
            SearchInterface.ClsSearch search = new SearchInterface.ClsSearch();
            String des = "";
            if (!string.IsNullOrEmpty(Id))
            {
                if (string.IsNullOrEmpty(type))
                {
                    return null;
                }

                string xmltext = search.getInfoByPatentID(Id, type, "1");
                MSXML2.DOMDocument30Class xml = new MSXML2.DOMDocument30Class();
                MSXML2.DOMDocument30Class xslt = new MSXML2.DOMDocument30Class();
                xml.loadXML(xmltext);

                XmlDocument doc = new XmlDocument();
                doc.Load(System.Web.HttpContext.Current.Server.MapPath("~") + "\\newcss\\des.xsl");
                string xsltext = doc.InnerXml;

                xslt.loadXML(xsltext);
                string desA = xml.transformNode(xslt).Replace ("charset=UTF-16", "charset=GB2312");
                int start = desA.IndexOf("<table");
                int end = desA.IndexOf("</table>") - start + 8;
                desA = desA.Substring(start, end);

                des = desA.Replace("document.write(", "//document.write(");
            }
            return des;
        }