c#读取远程XML,并显示。(新手救源码) c#读取远程XML,并显示。(新手救源码)非常感谢各位大侠! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 方法很多http://dotnet.aspx.cc/ShowDetail.aspx?id=4AE836F8-CCB4-4BEF-90B1-25BB1A5E6433 http://dotnet.aspx.cc/ShowDetail.aspx?id=0A6660CE-4138-41EF-B882-15DB65564709 例子http://dotnet.aspx.cc/Exam/GetPageHtml.aspx XmlDocument doc = new XmlDocument();doc.Load("http://ww.www.com/ss.xml");doc.Save(Console.Out );比如这段代码,要怎样写出来它呢 XmlDocument doc = new XmlDocument();doc.Load("http://ww.www.com/ss.xml");doc.Save(Console.Out );比如这段代码里的那个ss.xml,要怎样用代码1写出来它呢****************代码1*******************<%@ Page Language="C#" %><script language="C#" runat=server>public void Page_Load(Object obj,EventArgs e){ string xpath="odds_config.xml" ; try { DataSet ds= new DataSet(); FileStream fs= new FileStream(Server.MapPath(xpath),FileMode.Open,FileAccess.Read,FileShare.ReadWrite) ; ds.ReadXml(new StreamReader(fs)); fs.Close(); Trace.Warn("表记录数",Convert.ToString(ds.Tables[0].Rows.Count)); MyDataList.DataSource=ds.Tables[0].DefaultView; MyDataList.DataBind(); } catch (Exception ed) { Response.Write("<font color=#FF0000>"+ed.ToString()+"</font>") ; }}</script><ASP:Repeater id="MyDataList" runat="server"><itemtemplate><table> <tr> <td><%# DataBinder.Eval(Container.DataItem, "id") %></td></tr><tr><td><%# DataBinder.Eval(Container.DataItem, "tt")%></td></tr><tr><td><%# DataBinder.Eval(Container.DataItem, "sh") %></td></tr></table></itemtemplate></ASP:Repeater> 建购物网站,设计数据库? ascx 弹出js窗体 图片预览 暂存显示? csdn登录那个校验码是干什么用的,输错了都能登录 招聘WEB工程师 怎么可以准确的判断出一个会话的结束? javascript问题 大侠帮我看看"在客户端将DataGrid数据导入Excel"这段代码,哪出了问题呀? 谢谢! MVC框架中输入JSON出现的问题 菜問題:我使用DATAGRID控件如何實現選擇一行的效果 HTML关键字搜索(紧急) 初学水晶报表遇到的问题,请大家帮忙
http://dotnet.aspx.cc/Exam/GetPageHtml.aspx
doc.Load("http://ww.www.com/ss.xml");
doc.Save(Console.Out );比如这段代码,要怎样写出来它呢
doc.Load("http://ww.www.com/ss.xml");
doc.Save(Console.Out );比如这段代码里的那个ss.xml,要怎样用代码1写出来它呢
****************代码1*******************
<%@ Page Language="C#" %>
<script language="C#" runat=server>public void Page_Load(Object obj,EventArgs e)
{
string xpath="odds_config.xml" ;
try
{
DataSet ds= new DataSet();
FileStream fs= new FileStream(Server.MapPath(xpath),FileMode.Open,FileAccess.Read,FileShare.ReadWrite) ;
ds.ReadXml(new StreamReader(fs));
fs.Close();
Trace.Warn("表记录数",Convert.ToString(ds.Tables[0].Rows.Count));
MyDataList.DataSource=ds.Tables[0].DefaultView;
MyDataList.DataBind();
}
catch (Exception ed)
{
Response.Write("<font color=#FF0000>"+ed.ToString()+"</font>") ;
}
}</script><ASP:Repeater id="MyDataList" runat="server">
<itemtemplate>
<table>
<tr>
<td><%# DataBinder.Eval(Container.DataItem, "id") %></td>
</tr>
<tr>
<td><%# DataBinder.Eval(Container.DataItem, "tt")%></td>
</tr>
<tr>
<td><%# DataBinder.Eval(Container.DataItem, "sh") %></td>
</tr>
</table>
</itemtemplate>
</ASP:Repeater>