c# xml²Ù×÷
ÒÑÖªÓÐÒ»¸öXMLÎļþ£¨bookstore.xml£©ÈçÏ£º
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
1¡¢Íù<bookstore>½ÚµãÖвåÈëÒ»¸ö<book>½Úµã£º
XmlDocument xmlDoc=new XmlDocument();
xmlDoc.Load("bookstore.xml");
XmlNode root=xmlDoc.SelectSingleNode("bookstore");//²éÕÒ<bookstore>
XmlElement xe1=xmlDoc.CreateElement("book");//´´½¨Ò»¸ö<book>½Úµã
xe1.SetAttribute("genre","ÀîÔÞºì");//ÉèÖøýڵãgenreÊôÐÔ
xe1.SetAttribute("ISBN","2-3631-4");//ÉèÖøýڵãISBNÊôÐÔ
XmlElement xesub1=xmlDoc.CreateElement("title");
xesub1.InnerText="CS´ÓÈëÃŵ½¾«Í¨";//ÉèÖÃÎı¾½Úµã
xe1.AppendChild(xesub1);//Ìí¼Óµ½<book>½ÚµãÖÐ
XmlElement xesub2=xmlDoc.CreateElement("author");
xesub2.InnerText="ºò½Ý";
xe1.AppendChild(xesub2);
XmlElement xesub3=xmlDoc.CreateElement("price");
xesub3.InnerText="58.3";
xe1.AppendChild(xesub3);
root.AppendChild(xe1);//Ìí¼Óµ½<bookstore>½ÚµãÖÐ
xmlDoc.Save("bookstore.xml");
//================
½á¹ûΪ£º
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
<book genre="ÀîÔÞºì" ISBN="2-3631-4">
<title>CS´ÓÈëÃŵ½¾«Í¨</title>
<author>ºò½Ý</author>
&n
Ïà¹ØÎĵµ£º
³£ÓõÄϵÁл¯¶¨Ò壨using System.Xml.Serialization;£©
[XmlAttribute("name")] // ¶¨Òå<Tag name="…"></Tag>
[XmlElement("label")] // ¶¨Òå<label>…</label>
[XmlIgnoreAttrib ......
ÔÚMFC³ÌÐòÖÐʹÓÃXMLÎļþÅäÖù¤¾ßÀ¸
×÷ÕߣºÖì½ð²Ó
À´Ô´£ºhttp://www.cnblogs.com/clever101
ÏÖÔÚÎÒ·¢ÏÖʹÓÃVisual StudioµÄ×ÊÔ´±à¼Æ÷½øÐбà¼×ÊÔ´ÓÐ×ÅÖî¶àµÄ²»±ã£ºÊ×ÏÈÊÇÈκÎ×ÊÔ´µÄ±ä¶¯Ò»°ã±ä¶¯´úÂ룬²»ÀûÓÚϵͳά»¤£¬Æä´ÎVisual StudioµÄ×ÊÔ´±à¼Æ÷µÄ±¾ÉíµÄ¹¦ÄÜÓÐÏÞ£¬Ò²²»ÀûÓÚ½çÃæÃÀ»¯£¬ÈýÊDz»ÀûÓÚÈËÔ±·Ö¹¤£¬¿ª·¢ÈËÔ±¼ ......
JAVATMÓëXML 2010-05-14
Ò»¡¢¸ÅÄî
l ÈκÎXMLÎĵµ¶ÔÈκÎÀàÐ͵ÄÓ¦ÓÃÒÔ¼°ÕýÈ·µÄ½âÎö¶¼±ØÐë¾ßÓÐÁ¼ºÃµÄ½á¹¹well-formed
l XMLÎĵµ¿ÉÒÔÊÇÓÐЧµØ£¨valid£©£¬µ«²¢·ÇÒ»¶¨ÒªÇóÓÐЧ¡£
l PI£¨processing instruction£©¸ñʽ£º<?target instructions?>¡£XMLÖеĴ¦ÀíÖ¸ÁîÖ»ÄÜÊǽâÎöÆ÷¿ÉÒÔʶ±ðµÄXML±ê×¼´¦ÀíÃüÁ ......
C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´ ......