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

ÀûÓÃSqlHelper(ExecuteXmlReaderʹÓÃ)£¬×ª»»µ½xml¸ñʽ

ÀûÓÃsqlhelperÖеÄExcuteXmlReader·½·¨£¬¶ÁÈ¡Êý¾Ý²¢±£´æΪxmlÎļþ     
 string strConn = Properties.Settings.Default.Connections;
           SqlConnection connection = new SqlConnection(strConn);
         ---×¢Ò⣺ºóÃæµÄfor¸ñʽ
           string strsql = "select * from p where name=@name and other=@other FOR XML AUTO,root('root'),elements";
     
            SqlParameter[] sqlp = new SqlParameter[2];
            sqlp[0] = new SqlParameter("@name", "pp");
            sqlp[1] = new SqlParameter("@other", "ss");
            xr = SqlHelper.ExecuteXmlReader(connection, CommandType.Text, strsql,
               sqlp);
           XmlDocument xml = new XmlDocument();
           xml.Load(xr);
           xml.Save(Application.StartupPath + "\\test1.xml");


Ïà¹ØÎĵµ£º

¹ØÓÚxmlʹÓõĸÐÎò

н¨xmlÎļþµÄÇé¿ö¿ÉÄܲ»¶à£¬µ«¶Ô½Úµã¡¢ÊôÐÔµÄÔöɾ¸Ä²é»áºÜ³£¼û
 XmlDocument xmlDoc = new XmlDocument();
        xmlDoc.Load(Server.MapPath("data.xml"));
ÕâÁ½¾äÓ¦¸ÃºÜ³£Óõģ¬¼ÓÔØÒѾ­´æÔÚµÄxmlÎĵµ¡£
XmlNode root;//¸ù½Úµã
root = xmldoc.DocumentElement;//»ñÈ¡¸ù½ ......

javascript½«×Ö·û´®ÀàÐÍת»»ÎªXML¶ÔÏó

try { //Internet Explorer
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(data);
} catch(e) { //Other Browsers
parser=new DOMParser();
xmlDoc=parser.parsefromString(data,"text/xml");
} ......

Ajax ºÍ XML: ÎåÖÖ³£¼û Ajax ģʽ

Asynchronous JavaScript + XML£¨Ajax£©ÎÞÒÉÊÇ 2006 Äê×îÈÈÃŵļ¼ÊõÊõÓÇÒÓÐÍûÔÚ
2007 µÃµ½½øÒ»²½·¢Õ¹¡£µ«ÊǶÔÄúµÄÓ¦ÓóÌÐòÀ´ËµËü¾¿¾¹ÓÐʲôÒâÒåÄØ£¿Ajax Ó¦ÓóÌÐòÖÐÄÄÒ»ÖÖ³£¼û¼Ü¹¹Ä£Ê½Ó¦ÓÃ×î¹ã·ºÄØ£¿±¾ÎĽ«½éÉÜÎåÖÖ³£¼û
Ajax Éè¼Æģʽ£¬¿ÉÒÔʹÓÃËüÃÇ×÷Ϊ¹¤×÷µÄ»ù´¡¡£
µÄÈ·£¬Ajax
ÊÇ Web 2.0
ÈÈÃÅÊõÓËùÓÐÈ˶¼Ï£Íû ......

XML CDATA

 
ÔÚXMLÎĵµÖеÄËùÓÐÎı¾¶¼»á±»½âÎöÆ÷½âÎö¡£
Ö»ÓÐÔÚCDATA²¿¼þÖ®ÄÚµÄÎı¾»á±»½âÎöÆ÷ºöÂÔ¡£
½âÎöÊý¾Ý
XML ½âÎöÆ÷ͨ³£Çé¿öÏ»ᴦÀíXMLÎĵµÖеÄËùÓÐÎı¾¡£
µ±XMLÔªËر»½âÎöµÄʱºò£¬XMLÔªËØÄÚ²¿µÄÎı¾Ò²»á±»½âÎö:
<message>This text is also parsed</message>
XML½âÎöÆ÷ÕâÑù×öµÄÔ­ÒòÊÇXMLÔªËØÄÚ²¿¿ÉÄÜ» ......

asp.net ¶ÔxmlÎļþµÄ¶Áд,Ìí¼Ó,ÐÞ¸Ä,ɾ³ý²Ù×÷

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
private XmlDo ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ