XML文件绑定Repeater
XML文件:<configuration>
<map initialExtent="12036691.718120124 3360783.259641753 12951490.072612121 3956380.584039685" fullExtent="12036691.718120124 3360783.259641753 12951490.072612121 3956380.584039685">
<mapgroup label="影像数据">
<mapservice id="" label="湖北影像图PNG" type="kqtiled" visible="true" imageType="0" alpha="1">http://192.168.1.113:8066/hubei_jpg/</mapservice>
</mapgroup>
<mapgroup label="土地规划">
<mapservice id="" label="湖北影像图PNG" type="kqtiled" visible="true" imageType="0" alpha="1">http://192.168.1.113:8066/hubei_jpg/</mapservice>
</mapgroup>
<mapgroup label="地类图斑">
<mapservice id="" label="湖北地类图斑" type="kqtiled" visible="false" imageType="1" alpha="1">http://192.168.1.198:81/hubei_shape_pic/</mapservice>
<mapservice id="" label="湖北行政区" type="kqtiled" visible="false" imageType="1" alpha="1">http://192.168.1.198:81/hubei_shape_pic/</mapservice>
<mapservice id="" label="湖北地类图斑安唐模式" type="kqantang" quadKey="132" visible="false" imageType="1" alpha="1">http://192.168.1.136:8085/</mapservice>
</mapgroup>
</map>
</configuration>
怎么样将mapgroup节点的label属性绑定到Repeater上啊
--------------------编程问答-------------------- 加一个XmlDataSource,绑定到Repeater --------------------编程问答-------------------- 那ASPX页面上要写什么呢 --------------------编程问答-------------------- <asp:XmlDataSource
ID="xmlDataSource1"
runat="server"
DataFile="xml数据文件" />
<asp:Repeater ID="rptXML" DataSourceId="xmlDataSource1" …… --------------------编程问答--------------------
--------------------编程问答-------------------- 大侠QQ求助,490718154
DataTable dt=new DataTable();
DataRow newRow;
dt.Columns.Add("text",Type.GetType("System.String"));//列
//读取资源文件
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(System.Web.HttpContext.Current.Server.MapPath("~/Content/PseudoStatic.xml"));
XmlNodeList nodeList = xmlDoc.SelectSingleNode("data").ChildNodes;//获取节点集合
foreach (XmlNode item in nodeList)
{
XmlElement xe = (XmlElement)item;
newRow = tblDatas.NewRow();
newRow["text"] = xe.GetAttribute("label");
dt.Rows.Add(newRow );
}
//datatable绑定到Repeater
//手打请支持
补充:.NET技术 , ASP.NET