HTTPService是支持中文的,你现在出现中文显示错误是topics.jsp的文件编码不正确引起的。把topics.jsp保存为UTF-8编码就都ok了。
效果图
关于网友提出的HTTPSerivce中文问题的答复

Topic.mxml:

关于网友提出的HTTPSerivce中文问题的答复<?xml version="1.0" encoding="utf-8"?> 
关于网友提出的HTTPSerivce中文问题的答复
<mx:Application width="800" height="600" xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="xmlFeed.send()"> 
关于网友提出的HTTPSerivce中文问题的答复
<mx:HTTPService id="xmlFeed" url="topics.jsp" resultFormat="xml"/> 
关于网友提出的HTTPSerivce中文问题的答复
<mx:Tree id="blogTree" preferredWidth="250" heightFlex="1" dataProvider="{xmlFeed.result}"/> 
关于网友提出的HTTPSerivce中文问题的答复
</mx:Application>

topics.jsp:
关于网友提出的HTTPSerivce中文问题的答复<
关于网友提出的HTTPSerivce中文问题的答复
String str="<?xml version='1.0' encoding='utf-8'?>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="<node>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="   <node label='Macromedia'>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="      <node label='我是中文' url='http://www.markme.com/cc/index.rdf'/>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="      <node label='Christian Cantrell' url='http://www.markme.com/cantrell/index.rdf'/>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="      <node label='Kevin Lynch' url='http://www.klynch.com/index.rdf'/>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="      <node label='Mike Chambers' url='http://www.markme.com/mesh/index.rdf'/>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="      <node label='John Dowdell' url='http://www.markme.com/jd/index.rdf'/>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="  </node>"
关于网友提出的HTTPSerivce中文问题的答复  str
+="</node>"
关于网友提出的HTTPSerivce中文问题的答复%
> 
关于网友提出的HTTPSerivce中文问题的答复
<%=str%>

相关文章:

  • 2022-12-23
  • 2021-12-01
  • 2021-09-17
  • 2021-09-25
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-20
  • 2022-02-11
  • 2021-09-15
  • 2021-10-30
  • 2022-02-21
  • 2021-06-10
  • 2022-02-02
相关资源
相似解决方案