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

c# ´ÓXML¶ÁÊý¾Ý

C#
 DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath("~/Config/User_yhlx_Jb.xml"));
DataView dv = ds.Tables[0].DefaultView;
//dv.RowFilter = "State=0";
this.DropDownList1.DataSource = dv;
this.DropDownList1.DataTextField = "text";
this.DropDownList1.DataValueField = "value";
this.DropDownList1.DataBind();
XML
<?xml version="1.0" encoding="utf-8" ?>
<selects>
<select>
<text>¹ú¼Ò¼¶</text>
<value>1</value>
</select>
<select>
<text>Ê¡¼¶</text>
<value>2</value>
</select>
<select>
<text>Êм¶</text>
<value>3</value>
</select>
</selects>


Ïà¹ØÎĵµ£º

ת£ºjava½âÎöxmlÎļþËÄÖÖ·½Ê½


1.½éÉÜ
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓÚÐÅÏ¢²ã´ÎµÄ£¬Òò¶øDOM±»ÈÏΪÊÇ»ùÓÚÊ÷ ......

ÊÖ°ÑÊÖ½ÌÄãC#¶ÁÈ¡XMLÎļþ

C#¶ÁÈ¡XML×ÊÁÏ
Ò» C#¶ÁÈ¡XML×ÊÁÏ
À©³ä±ê¼ÇÓïÑÔXML£¨eXtensible Markup Language£©£¬ÊÇÓÉWÈýC»ú¹ØÖƶ©µÄ¡£×öΪÓÃÒÔ´úÌæHTMLÓïÑÔµÄÒ»ÖÖÐÂʽµÄ±ê¼ÇÓïÑÔ£¬XMLÄÚ²¿ÓÐןܶà¸ù±¾»ù×¼£¬XMLÄËÊǾ­¹ýÓëÕâЩÏà¸É»ù×¼µØ×éºÏ£¬Ó¦ÓÃÓÚ¿Æѧ¼ÆËã¡¢µç×Ó³ö°æ¡¢¶àýÌåϵÌåÀý×÷ºÍµç×ÓÉÌÎñµÄ¡£C££×÷ΪһÖÖÐÂʽµÄ³ÌÐòÓïÑÔ£¬ÊÇ.Net¹¹¼ÜµÄÒ»¸öÖ ......

³õѧXML£¨Ò»£©

XML¶¨Ò壺Óɱê¼Ç¼°ÆäËù±ê¼ÇµÄÄÚÈݹ¹³ÉµÄÎı¾Îļþ¡£
XML×÷ÓãºÓÃÀ´ÃèÊöÊý¾ÝµÄ½á¹¹£¬ÓÐЧ·ÖÀëÊý¾ÝµÄ½á¹¹ºÍ±íʾ£¬¿ÉÒÔ×÷ΪÊý¾Ý½»»»µÄ±ê×¼¸ñʽ¡£
XMLÌص㣺1¡¢¿ÉÒÔ×Ô¶¨Òå±ê¼Ç£¬±ê¼ÇÃû³ÆÊǶÔËù±ê¼ÇµÄÊý¾ÝÄÚÈݺ¬ÒåµÄ³éÏ󣬶ø²»ÊÇÊý¾ÝµÄÏÔʾ¸ñʽ¡£
            &n ......

C#Êý¾Ý¿â±à³Ì»ù´¡Ö®sqlÓï¾ä²Ù×÷Êý¾Ý¿âÊý¾Ý

        Á¬½Ósql serverÊý¾Ý¿âÓõ½µÄÃüÃû¿Õ¼äÊÇusing System.Data.SqlClient;
  Êý¾Ý¿âÁ¬½Ó´úÂë:¿ÉÒÔÔÚ´óÀàÖ®ÏÂÉùÃ÷ public SqlConnection myConnection;  //sqlÁ¬½Ó¶ÔÏó
               &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ