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

ÓйØxmlµÄÎÊÌ⣬ʵÔÚÊDz»Ã÷°×Ϊʲô - .NET¼¼Êõ / C#

ÎÒµÄxmlÊÇ£º
<?xml version="1.0" encoding="gb2312" ?>
<bookpages>
  <page src="../iamges/2.jpg">
  </page>
  <page src="../iamges/3.jpg">
  </page>
</bookpages>
   
´úÂëÊÇ
  XmlDocument myDoc = new XmlDocument();
  myDoc.Load("XMLFile1.xml");
  XmlNode parentNode = myDoc.SelectSingleNode("bookpages");

  XmlElement xe = myDoc.CreateElement("page");
  xe.SetAttribute("src", "../iamges/2.jpg");//ÉèÖøýڵãgenreÊôÐÔ  

  parentNode.AppendChild(myDoc);
  myDoc.Save("XMLFile1.xml");
ÏòÆäÖÐÌí¼ÓÊý¾Ý£¬µ«ÊÇÌí¼ÓÍêÖ®ºó£¬´ò¿ªXMLFile1.xml²¢Ã»ÓÐÌí¼Ó½Úµã¿ÉÔÚbin debugÏÂÓÖÓÐÊý¾Ý£¬¸´ÖƵ½±ðµÄµØ·½£¬Ìí¼ÓµÄ½ÚµãÔòÏÔʾ³öÀ´ÁË£¬ÕâÊÇΪʲô°¡£¿£¿£¿
×Ô¼ºup

ûÌýÃ÷°×lzµÄÒâ˼
myDoc.Load("XMLFile1.xml");¡¢ myDoc.Save("XMLFile1.xml");£¿£¿£¿£¿
ÄãÊÇÏë½âÎöÒ»¸öxmlÎļþ»¹ÊÇн¨Ò»¸öÎļþ£¿


·¾¶ÎÊÌâ°É

¾ÍÊÇÏëÔÚ½¨ºÃµÄxmlÖÐÌí¼Ó½Úµã

»»³ÉmyDoc.LoadXml("XMLFile1.xml");ÊÔÊÔ

parentNode.AppendChild(myDoc);
¸Ä³É
parentNode.AppendChild(xe);

ÏÖÔÚÊÔÈ¥ÁË

´ó¸ç£¬Äãн¨µÄ½Úµã¶¼Ã»ÓÐÌí¼Ó½øÈ¥£¬º¹

¿ÉÄܲ»ÊÇÄã×Ô¼ºµÄ


Ïà¹ØÎÊ´ð£º

java xmlÎÄÌâ - Java / Java SE

<?xml version="1.0" encoding="utf-8" ?> 
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......

c#Éú³ÉxmlÎļþ - .NET¼¼Êõ / C#

˼·£ºÒªÓÃc#Éú³ÉÒ»¸ö²¥·Å»úµÄ²¥·ÅÁбíµÄxml£¬ÀýÈ磺
<daty datys='2010-04-05' datye='2010-05-01' > //ÕâÊDz¥·ÅµÄÈÕÆÚ¶Î
  <time times='01:12:00' timee='02:30:00'> ......

Document½âÎöxmlÓöµ½µÄÎÊÌâ~~ - ÒÆ¶¯Æ½Ì¨ / Android

XMLÎļþÄÚÈÝ£º
- <ResList>
  <page>0</page> 
- <resItem>
  <resName>WWW</resName> 
  </resItem>
- <resItem>
&nb ......

c# listviewÌí¼ÓºÏ¼ÆÐÐ - .NET¼¼Êõ / C#

ÓÃlistviewÏÔʾ³ö´ÓÊý¾Ý¿âÖвéѯ³öµÄ¼Ç¼£¬ÏëÔÚ×îºó¼Ç¼ºóÃæÌí¼ÓÒ»ÌõºÏ¼ÆÐУ¬ÈçºÎʵÏÖ£¡Ð»Ð»´ó¼Ò£¡
°ó¶¨Êý¾ÝÄãÓ¦¸ÃûÎÊÌâ°É£¬°ó¶¨ÍêÒÔºóÓÃÒ»¸öÑ­»·°ÑÄãҪͳ¼ÆÊý¾ÝµÄÁÐÖеÄÊý¾Ý×ܺÍÓÃÒ»¸ö±äÁ¿½ÓÊÜ£¬È»ºóÔÚÑ­»·ÍâÃæne ......

Çë´ó¼ÒÖ¸µãÒ»ÏÂC/S½á¹¹µÄ·ÖÒ³Á÷³Ì - .NET¼¼Êõ / C#

´ó¼ÒºÃ£¬ÎÒÊÇÐÂÊÖ£¬¸Õ¿ªÊ¼½Ó´¥C/S½á¹¹µÄ³ÌÐò£¬ÏëҪʵÏÖÒ»¸ö·ÖÒ³¹¦ÄÜ£¬´ó¼ÒÓÐûÓкõãµÄ·ÖÒ³¿Ø¼þ»òÕß³ÌÐòÖ®ÀàµÄ£¬µ±È»Ô´³ÌÐò¸üºÃ£¬·ñÔò˵˵Á÷³ÌÒ²¿ÉÒÔ£¬Ð¡Ãü±°¡£¬ÔÚÏߵȡ£¡£¡£¡£
´ó¼Ò°ï°ï棬ллÁË£¬¼±¡£¡£¡£

Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ