XMLÎļþ°ó¶¨Êý¾Ý¼¯¿Ø¼þ²Ù×÷
//Êý¾Ý°ó¶¨
public void DataBind()
{
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath(@"App_data/dbGuest.xml"));
GridView1.DataSource = ds.Tables[0].DefaultView;
GridView1.DataBind();
}
//Ìí¼Ó
public void XmlDataAdd()
{
DataSet ds = new DataSet();
ds.ReadXml(Server.MapPath(@"App_data/dbGuest.xml"));
DataRow dr = ds.Tables[0].NewRow();
dr["Name"] = "spark";
dr["City"] = "tokyo";
dr["Email"] = "jis@163.com";
dr["Message"] = "thank you";
dr["STime"] = DateTime.Now.ToString();
ds.Tables[0].Rows.Add(dr);
ds.WriteXml(Server.MapPath(@"App_data/dbGuest.xml"));
}
dbGuest.xml
<?xml version="1.0" standalone="yes"?>
<dbGuest xmlns="http://tempuri.org/dbGuest.xsd">
<User>
<Name>shaoazhd</Name>
<City>beijing</City>
<Email>sss@22.net</Email>
<Message>afsa</Message>
</User>
<User>
&
Ïà¹ØÎĵµ£º
Õª×Ô--http://www.moandroid.com/?p=821
Android¶ÁдXML£¨ÖУ©——SAX
By: º£ÊÐò×Â¥ | In: Android¿ª·¢
22 ¾Å 2009
ÔÚAndroid¶ÁдXML£¨ÉÏ£©——package˵Ã÷ÖУ¬Ïêϸ½éÉÜÁËʹÓà DOM·½·¨¶ÁÈ¡XMLÎĵµ£¬ÓÉÓÚʹÓÃDOM·½·¨ÐèÒª½«Õû¸öXMLÎĵµ¼ÓÔØÄÚ´æÖУ¬¶Ôϵͳ×ÊÔ´Õ¼ÓñȽ϶࣬Õâ¶ÔÄÚ´æ±È½Ï½ôÕŵ ......
Õª×Ô--http://www.moandroid.com/?p=868
¶ÁдXML£¨Ï£©——´´½¨XMLÎĵµ
By: º£ÊÐò×Â¥ | In: Android¿ª·¢
23 ¾Å 2009
ÔÚÇ°ÃæµÄ2ƪÎÄÕÂAndroid¶ÁдXML£¨ÉÏ£©——package˵Ã÷¡¢Android¶ÁдXML£¨ÖУ©——SAXÖÐÏë±Ø´ó¼Ò¶ÔXMLÎļþ¶ÁÈ¡µÄ·½·¨ÒѾ±È½ÏÊìϤÁË£¬ÔÚÕâÀïÎÒÃǾͲ»¶à˵ÁË£¬Ö±½Ó˵Ã÷ ......
XMLÔÚÎÒÃǵijÌÐòÖÐÓõ½µÄÔ½À´Ô½¶à£¬ÒòΪËü´æ´¢¡¢¶ÁÈ¡¡¢Ð޸Ķ¼±È½Ï·½±ã¡£
ÏÂÃæÎÒÀ´·ÖÏíÒ»ÏÂXMLµÄ³£ÓòÙ×÷(Ôöɾ¸Ä²é)£¬ÏÂÃæÊdzÌÐòÔËÐÐЧ¹û£º
Ôö(Ôö¼Ó½Úµã°üÀ¨´´½¨XML):
/// <summary>
/// ´´½¨XMLÎĵµ
/// </summary>
/// <param name="path"></param>
......
XML ºÍ JSON Êǵ±½ñ³£ÓõÄÁ½ÖÖÊý¾ÝÃèÊöÓë´«ÊäµÄ¸ñʽ£¬ÌرðÊÇÉæ¼°µ½ JS ʱʹÓà JSON ÆÄΪƵ·±¡£×ÔÈ»£¬ÔÚ Java µÄÊÀ½çÀïÉÙ²»ÁËÍê³É JavaBean ÓëÕâÁ½ÖÖ¸ñʽÏ໥ת»»µÄ×é¼þ£¬ÄǾÍÊÇ XStream ºÍ JSON-lib¡£ÕâÀïÎÒ¼òµ¥¼ÇÏ XStream µÄÓ÷¨¡£
ÆäʵÏàÀàËƵŤ¾ßÔçÒÑÓÐÖ®¡£Èç¹ûÓùý DWR µÄͬ־£¬Ò»¶¨ÓÐÓ¡Ïñ£¬DWR ½øÐÐÔ¶ ......