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

xml ºÍ datagridview

°ÑxmlÖÐij¸ö½ÚµãµÄÖµµÄÄÇÒ»ÐÐÏÔʾµ½datagridviewÖС£
ÀýÈçxmlÖзûºÏ <Name>"СÃ÷"</Name> £¨ËùÓÐNameµÄֵΪСÃ÷µÄÐÐÑ¡³öÀ´´ÓxmlÖÐ È»ºóÏÔʾµ½datagridviewÖУ©
Ïȷŵ½·ºÐÍÀàÖаÉ

Ïȷŵ½·ºÐÍÀàÖаɡ£

Ôõô¸ö×ö·¨ÄØ¡£¡£¸øµã´úÂë°ÉÉÔ΢¡£¡£
string str1 = "";
str1 = listBox1.SelectedItem.ToString();
foreach (DataRow dr in dataSet1.Tables["User"].Rows)
  {
  if (dr["Net"].ToString() == str1)
  {
  //
  }
  }
//Ïë°Ñ»ñÈ¡µÃµ½µÄÕâÒ»ÐÐÈ¡³öÀ´£¬·Åµ½xmlÖУ¬È»ºóÔÙÓÃdatagridview¶ÁÈ¡£¿

XML½á¹¹ÊÇʲôÑù
XmlNodeList nodelist= xmldoc.SelectSingleNode("a/BB[@name='']").ChildNodes
±éÀú¶Áȡֵ
»òDataset

¼òµ¥µÄ×ö·¨£¬½«xmlÎĵµ¼ÓÔØµ½datasetÈ»ºóʹÓÃdatatableµÄselectº¯Êý£¬Ñ¡Ôñname='СÃ÷'µÄËùÓÐÐÐ

»Ø¸´sq_zhuyi

Äã¿ÉÒÔдϲ»

DataSet ds = new DataSet();
ds.ReadXml("c:/a.xml");
DataRow[] rows = ds.Tables[0].Select("name='СÃ÷'");
½«rows°ó¶¨¸øgrid


Ïà¹ØÎÊ´ð£º

Êý¾ÝÒÔxml¸ñʽ·µ»Ø - MS-SQL Server / Ó¦ÓÃʵÀý

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......

Êý¾Ý±íÉú³ÉÌØ¶¨¸ñʽµÄxml - .NET¼¼Êõ / ASP.NET

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽÎļþ
<folder state="unchecked" label="È«²¿">
¡¡¡¡<folder state="unchecked" isBra ......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎͼ¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......

ÈçºÎÌí¼ÓXML½áµãºÍÏà¶ÔÓ¦µÄÖµ¡£

ÈçºÎÌí¼ÓXML½áµãºÍÏà¶ÔÓ¦µÄÖµ¡£Çë´ó¼Ò°ï°ïæ

---------------------------------------
Asp.Net,C#,SQL,JS,WCF,AJAX,¹¤×÷Á÷,WPF,MVC,LINQ,Éè¼ÆÄ£Ê½(¼Ü¹¹)µÈ¼¼ÊõÌÖÂÛ 
¡°ASP.NET(C#)Fans¡± QQȺ£º96877690 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ