访问的是TOMCAT上的webservice应用
返回了包含  "流星” 的xml
如果这些文字在html中将正常显示为中文字符:   流星
可是我做的是winform程序,请问如何在程序中实现这个转换过程,谢谢!
给思路或者代码都可以,代码无所谓c#或者vb.net,高分相酬,不够可加!感谢各位兄弟姐妹先

解决方案 »

  1.   

    自己测试了下,其实&#27969,html解析出来就是汉字  流
    27969就是流的ascii编码
    我现在想知道的就是如何来实现这个转换过程,自己写函数的话,webservice返回的XML中可能中英文混杂,就麻烦了
    想请教如何模拟IE识别html的过程……
      

  2.   

    private void Form1_Load(object sender, EventArgs e)
    {
        webBrowser1.DocumentText =
            "<html><body>Please enter your name:<br/>" +
            "<input type='text' name='userName'/><br/>" +
            "<a href='http://www.microsoft.com'>continue</a>" +
            "</body></html>";
    }
      

  3.   

    webform:
    Response.Write(Server.HtmlDecode("&amp;#27969;&amp;#26143;"));winform:
    引用System.Web.Dll
    然后
    HttpUtility.HtmlDecode("&amp;#27969;&amp;#26143;");
      

  4.   

    TO amandag HttpUtility.HtmlDecode("&amp;#27969;&amp;#26143;"); 偶测试messagebox.show(system.web.HttpUtility.HtmlDecode("&amp;#27969;&amp;#26143;"))的结果如下
    只是去掉了amp;   27969并未转换成汉字    流------------------------------------------------------
    &#27969;&#26143;
    ---------------------------
    确定   
    ---------------------------
      

  5.   

    很简单:using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.IO;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Web;
    using System.Xml;namespace TestHtmlDecode
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }        private void button1_Click( object sender, EventArgs e )
            {
                string tempHTML = HttpUtility.HtmlDecode(this.textBox1.Text.Trim());
                XmlDocument xmlDoc = new XmlDocument();
                XmlElement xe = xmlDoc.CreateElement( "node" );
                xe.InnerXml = tempHTML;
                this.textBox2.Text = xe.InnerText;
            }
        }
    }结果:输入: &amp;#27969;&amp;#26143;输出: 流星完毕,给分