xml²Ù×÷
Ìí¼Ó¼Ç¼µ½ds±£´æµ½xml
DataSet ds = new DataSet("myDs");
//´ÓXMLÖжÁÈ¡Êý¾Ý
ds.ReadXml(Server.MapPath(@".dbdbGuest.xml"));
//ÒÔÏÂΪÌí¼Ó¼Ç¼
DataRow dr = ds.Tables[0].NewRow();
dr["Name"] = tbName.Text.Trim();
dr["City"] = tbCity.Text.Trim();
dr["Email"] = tbEmail.Text.Trim();
dr["Message"] = tbComments.Text.Trim();
dr["STime"] = DateTime.Now.ToString();
ds.Tables[0].Rows.Add(dr);
//д»ØXML
ds.WriteXml(Server.MapPath(".\db\dbGuest.xml"));
ÓÃdsÏÔʾxml
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath(@".dbdbGuest.xml"));
dgShow.DataSource = ds.Tables[0].DefaultView;
dgShow.DataBind();
xmlÌí¼Óµ½ArrayList
<?xml version="1.0" encoding="utf-8" ?>
<PEOPLE>
<PERSON>ÕÅÈý</PERSON>
<PERSON>ÀîËÄ</PERSON>
</PEOPLE>
XmlDocument doc = new XmlDocument();
&
Ïà¹ØÎĵµ£º
xmlÎļþÈçÏ£º<?xml version="1.0" encoding="gb2312"?>
<Èí¼þ¹ÜÀíϵͳ>
<¹ÜÀíÔ±>
<Óû§Ãû>Ã÷ÈտƼ¼</Óû§Ãû>
<ÃÜÂë>123456</ÃÜÂë>
<µØÖ·>³¤´ºÊÐ</µØÖ·>
</¹ÜÀíÔ±>
<¹ÜÀíÔ±>
<Óû§Ãû>Ã÷ÈÕÈí¼þ</Óû§Ãû ......
MSXML2::IXMLDOMDocumentPtr pDoc;
MSXML2::IXMLDOMElementPtr xmlRoot ;
// ´´½¨DOMDocument¶ÔÏó
HRESULT hr = pDoc.CreateInstance(__uuidof(MSXML2::DOMDocument40));
if ( ! SUCCEEDED(hr))
{
MessageBox( " ÎÞ·¨´´½¨DOMDocument¶ÔÏó£¬Çë¼ì²é ......
http://topic.csdn.net/u/20080905/10/caea1689-4582-417a-8723-d008a3ae1a10.html?550638422
tringBuilder sb = new StringBuilder();
sb.Append(" <?xml version=\"1.0\"?> ");
......
2£®DOMʵÀý
ÓÐÁËÉÏÃæµÄ½éÉÜ£¬ÏàÐÅÄã¶ÔDOMÀí½âµÄ¸ü¶àÁË°É¡£ÏÂÃæµÄÀý×Ó½«ÈÃÄã¶ÔDOM¸ü¼ÓÊìϤÆðÀ´¡£
ÏÈ˵˵Õâ¸öÀý×Óµ½µ×Òª×öµÄÊÇʲô°É£¬ÎÒÃÇÏ£ÍûÔÚÒ»¸öÃûΪlink.xmlÎļþÖб£´æÁËһЩURLµØÖ·£¬Í¨¹ýÒ»¸ö¼òµ¥µÄ³ÌÐò£¬ÎÒÃÇ¿ÉÒÔͨ¹ýDOM°ÑÕâЩURL¶Á³ö²¢ÏÔʾ³öÀ´£¬Ò²¿ÉÒÔ·´¹ýÀ´ÏòÕâ¸öXMLÎļþÖÐдÈë¼ÓÈëµÄURLµØÖ·¡£ºÜ¼òµ¥£¬È´ºÜÊµÓ ......