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

XMLµÄʹÓÃ


дXML£º
    protected void btnSave_Click(object sender, EventArgs e)
    {
        //ȨÏÞÅжÏ
        XmlTextWriter xmlw = new XmlTextWriter(Server.MapPath("~\\") + "FriendLink.xml", Encoding.GetEncoding("gb2312"));
        xmlw.Formatting = Formatting.Indented;
        xmlw.WriteStartDocument();
        xmlw.WriteStartElement("Pictures");
        string[] pic = Request.Form["picsrc"].Split(',');
        string[] url = Request.Form["urlsrc"].Split(',');
        string[] nam = Request.Form["name"].Split(',');
        int[] wh = null;
        for (int i = 0; i < 4; i++)
        {
            xmlw.WriteStartElement("picsrc");
            xmlw.WriteString(pic[i]);
            xmlw.WriteEndElement();
            xmlw.WriteStartElement("name");
            if (string.IsNullOrEmpty(nam[i]))
                xmlw.WriteString("...");
            else
                xmlw.WriteString(nam[i]);
            xmlw.WriteEndElement();
            xmlw.WriteStartElement("


Ïà¹ØÎĵµ£º

JavaÖÐËÄÖÖXML½âÎö¼¼Êõ

DOMÊÇ»ùÓÚÆ½Ì¨¡¢ÓïÑÔÎ޹صĹٷ½W3C±ê×¼¡£»ùÓÚÊ÷µÄ²ã´Î£¬ÆäÓŵãÊÇ¿ÉÒÔÒÆÖ²£¬±à³ÌÈÝÒ×£¬¿ª·¢ÈËÔ±Ö»ÐèÒªµ÷Óý¨Ê÷µÄÖ¸Áî¡£ÆäȱµãÊǼÓÔØ´óÎļþ²»ÀíÏë¡£
¡¡¡¡SAXÊÇ»ùÓÚʼþÄ£Ð͵ģ¬ËüÔÚ½âÎö XML ÎĵµµÄʱºò¿ÉÒÔ´¥·¢Ò»ÏµÁеÄʼþ£¬µ±·¢ÏÖ¸ø¶¨µÄtagµÄʱºò£¬Ëü¿ÉÒÔ¼¤»îÒ»¸ö»Øµ÷·½·¨£¬¸æË߸÷½·¨Öƶ¨µÄ±êÇ©ÒѾ­ÕÒµ½¡£ÀàËÆÓëÁ÷ýÌåµÄ½ ......

XML ÖУ¬ÓÐ 5 ¸öÔ¤¶¨ÒåµÄʵÌåÒýÓãº


&lt;
<
СÓÚ
&gt;
>
´óÓÚ
&amp;
&
ºÍºÅ
&apos;
'
µ¥ÒýºÅ
&quot;
"
ÒýºÅ
 
×¢ÊÍ£ºÔÚ XML ÖУ¬Ö»ÓÐ×Ö·û "<" ºÍ "&" ȷʵÊÇ·Ç·¨µÄ¡£´óÓÚºÅÊǺϷ¨µÄ£¬µ«ÊÇÓÃʵÌåÒýÓÃÀ´´úÌæËüÊÇÒ»¸öºÃϰ¹ß¡£ ......

.NET SQLServer2005 XML×Ö¶Î

//ÕâÊÇÌí¼Ó 
private void button1_Click(object sender, EventArgs e)
        {
            string s = "Persist Security Info=False;Integrated Security=SSPI;database=IIntegration;server=(local)";
 &n ......

Load/Unload XML data in DB2

If XML data in the table is less than 32K for each record, then you can directly unload the data as char. If XML data exceeds 32K for some records, then you have to unload the common data and the XML data separately. First, create a template for unloading XML into a PDS: TEMPLATE LOBFRV DSN 'AAA. ......

ÓÃjquery½âÎöxmlÎļþ

²âÊÔÓõÄxmlÎļþ
<?xml version="1.0" encoding="UTF-8"?>
<schools>
<school id='111'>²âÊÔѧУ</school>
<school id='222'>²âÊÔѧУ22
<class id='2.1'>²âÊ԰༶222</class>
</school>
</schools> 
²âÊÔÓõÄJavaScript´úÂë
$().ready(function ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ