asp.net ¶ÁÈ¡XmlÎļþ²¢½øÐÐDropDownListÊý¾Ý°ó¶¨
<asp:DropDownList ID="compactType" runat="server" AutoCallBack="True" Width="153px"> </asp:DropDownList>
<?xml version="1.0" encoding="utf-8" ?>
<roots>
<root>
<id>1</id>
<Culture>³õÖÐÒÔÏÂ</Culture>
</root>
<root>
<id>2</id>
<Culture>³õÖÐ</Culture>
</root>
<root>
<id>3</id>
<Culture>ÖÐר</Culture>
</root>
<root>
<id>4</id>
<Culture>¸ßÖÐ</Culture>
</root>
<root>
<id>5</id>
<Culture>´óר</Culture>
</root>
<root>
<id>6</id>
<Culture>±¾¿Æ</Culture>
</root>
</roots>
/// <summary>
/// ¶ÁÈ¡xmlÎļþ,ÓÃÊý¾ÝÌî³äDropDownList,½øÐаó¶¨
/// </summary>
/// <param name="path">xmlÎļþ·¾¶</param>
/// <param name="dp">Òª½øÐа󶨵ÄDropDownListÃû³Æ</param>
/// <param name="id">DropDownListÒªÏÔʾµÄÎı¾(xmlÎļþµÄÒ»¸ö½Úµã)</param>
/// <param name="val">DropDownListÒªÏÔʾµÄÖµ(xmlÎļþµÄÒ»¸ö½Úµã)</param>
public void ReadXml(string path,DropDownList dp,string id,string val)
{
DataSet ds = new DataSet();
ds.ReadXml(path);
dp.DataSource = ds;
dp.DataTextField = id ;
dp.DataValueField = val;
dp.DataBind();
}
SecurityFactory sf = new SecurityFactory();
//xmlÎļþ·¾¶
string path2 = Server.MapPath("./xml/XMLFile2.xml");
sf.ReadXml(path2, this.compactType, "id", "val");
Ïà¹ØÎĵµ£º
Õª×Ô--http://www.moandroid.com/?p=821
Android¶ÁдXML£¨ÖУ©——SAX
By: º£ÊÐò×Â¥ | In: Android¿ª·¢
22 ¾Å 2009
ÔÚAndroid¶ÁдXML£¨ÉÏ£©——package˵Ã÷ÖУ¬Ïêϸ½éÉÜÁËʹÓà DOM·½·¨¶ÁÈ¡XMLÎĵµ£¬ÓÉÓÚʹÓÃDOM·½·¨ÐèÒª½«Õû¸öXMLÎĵµ¼ÓÔØÄÚ´æÖУ¬¶Ôϵͳ×ÊÔ´Õ¼ÓñȽ϶࣬Õâ¶ÔÄÚ´æ±È½Ï½ôÕŵ ......
±¾ÎÄϵתÔØ£¬½÷ÏòתÔØ´¦¿Õ¼äÓµÓÐÕß¼°Ô´³ö´¦ÎÄÕÂ×÷Õß±íʾ¸Ðл£¡
תÔØ´¦£ºhttp://henry19890701.javaeye.com/blog/481462
Ô´³ö´¦£ºhttp://www.ziliaonet.com/tech/netprogramme/XML/200605/69398.html
ÔÚ×öÒ»°ãµÄXMLÊý¾Ý½»»»¹ý³ÌÖУ¬ÎÒ¸üÀÖÒâ´«µÝXML×Ö·û´®£¬¶ø²»ÊǸñʽ»¯µÄXML Document¡£Õâ¾ÍÉæ¼°µ½XML×Ö·û´®ºÍXml Docume ......
[System.Runtime.Serialization.DataMemberAttribute()]
public Information Archive {
get {
&n ......
ÓÃAsp.NetÉÏ´«Îļþ,Ê×Óõ½µÄÊÇFileUpload¿Ø¼þ
<asp:FileUpload ID="FileUpload1" runat="server" /><br />
<asp:Button ID="btn" runat="server" Text="È·¶¨" OnClick="btn_Click"/>
C#´úÂë
protected void btn_Click(object sender, EventArgs e)
{
//ÅÐ¶Ï ......
·½·¨Ò»£º
HtmlProxy.cs£º
using System.Text;
using System.IO;
/// <summary>
/// HtmlProxy µÄժҪ˵Ã÷
/// </summary>
public class HtmlProxy
{
public HtmlProxy()
{
//
......