Éú³ÉXML×Ö·û´®ÎÊÌâ
string b = "";
b = System.Guid.NewGuid().ToString();//»ñµÃ»á»°ID
//дXML
XmlDocument xml = new XmlDocument();
XmlDeclaration dec = xml.CreateXmlDeclaration("1.0", "GBK", null);
xml.AppendChild(dec);
XmlNode rootnode = xml.CreateNode(XmlNodeType.Element, "userinfo", "");
xml.AppendChild(rootnode); //Ìí¼Ó¸ú½Úµã
XmlNode childnode1 = xml.CreateNode(XmlNodeType.Element, "sessionID", "");
childnode1.InnerText = b;
rootnode.AppendChild(childnode1);
ÉÏÃæÊÇÎÒдµÄÒ»¸öXMLÎļþ£¬Ã»±£´æµÄ£¬ÎÒÏëÔÚÕâ¸ö»ù´¡ÉÏÉú³ÉXML×Ö·û´®£¬ÓÃstringbuilderÔõôʵÏÖ£¬¼±°¡£¬Çë¸ßÊÖ½â¾ö£¡
string xml = @"<?xml version=""1.0""?>";
XmlDocument doc= new XmlDocument();
doc.LoadXml(xml);
doc.Save("c:\\a.xml");
string xml = @" <?xml version=""1.0""?>";
XmlDocument doc= new XmlDocument();
doc.LoadXml(xml);
doc.Save("c:\\a.xml");
ÎÒ²»Ïë±£´æµ½Ä³¸ö·¾¶È¥£¬Ö»ÊÇÏë·µ»ØÕâ´®XML×Ö·û´®¶øÒÑ
Ö±½ÓÆ´×Ö·û´®ºÃÁË£¬ºÎ±ØÒªÓÃXmlDocument
ÏñÎÒÉÏÃæÄÇÑùдµÄ£¬ÔõôȥÉú³ÉXML×Ö·û´®£¬¼±°¡~
{{----}
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......
ÒÑÖªÎļþ1.xmlºÍÊý¾ÝÎļþdb.xml£¬ÈçºÎÓÃjava±àд³ÌÐò£¬µÃ³ö2.xmlÎļþ£¿
1.ÒÑÖªxmlÎļþ 1.xml½á¹¹ÈçÏ£º
<cs>
<cs name="cs1" details="This is cs1" country="China&q ......
²ÉÓÃDOM ½øÐнâÎöxml¡£ÒªÇó½«xml×Ö´®²åÈëÖ¸¶¨½Úµã×÷ΪÆä×Ó½Úµã
±ÈÈ磺
Ôxml
<root>
</root>
Òª²åÈëµÄxml×Ö´®
<a>test</a>
Ä¿µÄxml£º
<root>
<a> ......
¡¶C#Èë޵䡷µÚÈý°æ£¨vs2005£©Ëµ±àдxmlºó¿ÉÒÔÓÒ»÷£¬Ñ¡view data grid£¬ÓÃÁбíÏÔʾÊý¾Ý¡££¨23.1.7½Ú£©
ÎÒÏÖÔÚÔÚÓÃvs2008£¬ÎÒÏàÐÅÕâ¸ö¹¦ÄÜÓ¦¸Ã»¹ÊÇÓе쬱»·Åµ½ÄĶùÈ¥ÁËÄØ£¿
ʵ¼ùһϾÍÖªµÀÀ²£¡
ÒýÓÃ
ʵ¼ùÒ»Ï ......