Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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");


Ïà¹ØÎĵµ£º

[ת]Android¶ÁдXML£¨ÖУ©——SAX


 Õª×Ô--http://www.moandroid.com/?p=821
Android¶ÁдXML£¨ÖУ©——SAX
By: º£ÊÐò×Â¥ | In: Android¿ª·¢
22 ¾Å 2009
ÔÚAndroid¶ÁдXML£¨ÉÏ£©——package˵Ã÷ÖУ¬Ïêϸ½éÉÜÁËʹÓà DOM·½·¨¶ÁÈ¡XMLÎĵµ£¬ÓÉÓÚʹÓÃDOM·½·¨ÐèÒª½«Õû¸öXMLÎĵµ¼ÓÔØÄÚ´æÖУ¬¶Ôϵͳ×ÊÔ´Õ¼ÓñȽ϶࣬Õâ¶ÔÄÚ´æ±È½Ï½ôÕŵ ......

XML×Ö·û´®ºÍXMLÎĵµÖ®¼äµÄ×ÔÓÉת»»

±¾ÎÄϵתÔØ£¬½÷ÏòתÔØ´¦¿Õ¼äÓµÓÐÕß¼°Ô´³ö´¦ÎÄÕÂ×÷Õß±íʾ¸Ðл£¡
תÔØ´¦£ºhttp://henry19890701.javaeye.com/blog/481462
Ô´³ö´¦£ºhttp://www.ziliaonet.com/tech/netprogramme/XML/200605/69398.html
ÔÚ×öÒ»°ãµÄXMLÊý¾Ý½»»»¹ý³ÌÖУ¬ÎÒ¸üÀÖÒâ´«µÝXML×Ö·û´®£¬¶ø²»ÊǸñʽ»¯µÄXML Document¡£Õâ¾ÍÉæ¼°µ½XML×Ö·û´®ºÍXml Docume ......

C# XmlÖÐÓ³ÉäΪÀàÊý¾Ý½á¹¹£¨±¨ÎÄ£©

        [System.Runtime.Serialization.DataMemberAttribute()]
        public Information Archive {
            get {
         &n ......

Asp.NetÎļþÉÏ´«

 ÓÃ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)
{
//ÅÐ¶Ï ......

asp.netÒ³Ã澲̬»¯

·½·¨Ò»£º
HtmlProxy.cs£º
using System.Text;
using System.IO;
 
/// <summary>
/// HtmlProxy µÄժҪ˵Ã÷
/// </summary>
public class HtmlProxy
{
     public HtmlProxy()
     {
         //
  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ