100·ÖÇóÖúÈçºÎÓÃjavascriptÓïÑÔ°ÑXMLת»»³ÉJSON
RT ÈçºÎʹÓÃJavaScript°ÑÒ»·Ýxml¸ñʽµÄÎļþÖеÄdata¶Áȡת»»³ÉJSON Êý×é¸ñʽ£¬ÅªºÃµÄÔÚ¼Ó·ÖÊý
XML code:
- <channel>
<title>Key Events from Joe Santoro</title>
- <item>
<title>IMPACT 2010</title>
<events:start>May 02, 2010 12:00 AM</events:start>
<events:end>May 07, 2010 12:00 AM</events:end>
</item>
- <item>
<title>IMPACT 2010</title>
<events:start>May 02, 2010 12:00 AM</events:start>
<events:end>May 07, 2010 12:00 AM</events:end>
</item>
- </channel>
ת»»³ÉÕâÑùµÄ
JScript code:
var json= [{
"title": "IMPACT 2010",
"events_start": "May 02, 2010 12:00 AM",
"events_end": "May 07, 2010 12:00 AM"
},
{
"
"title": "IMPACT 2010",
"events_start": "May 02, 2010 12:00 AM",
"events_end": "May 07, 2010 12:00 AM"
}];
Êä³öµÄ½á¹ûÊÇ:JScript code
Code highlig
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......
ÎÒÔÚ±àдһ¸öwince5.0µÄ³ÌÐò£¬ÏëʵÏÖ°ÑPDAÉϵÄÒ»¸öLIST <STRING>ÀàÐ͵ÄÊý¾ÝÐòÁл¯ÎªXML£¬È»ºóÔÚPCÉϵÄÒ»¸öwebserviceÄõ½Õâ¸öXML£¬×ª»¯ÎªDataset£¬¸üÐÂPCÉϵÄÊý¾Ý¿â£¬ÎÒÏëÎÊÔõô°ÑXML´«¸øwebserviceµÄÄØ£¿
......
×î½ü ʹÓà js, ¾³£²»ÄÜÉÏÍø, Ï£ÍûÄÄλ´ïÈË ÄÜÌṩһ¸ö
±È½ÏÍêÕûµÄ jsÀëÏßÎĵµ,ÐÂÒ»µã¶ù,ÍêÕûµã¶ùµÄ±È½ÏºÃ,±ÈÈçÉæ¼° dom ÕâЩ
ÇëÖ¸µãÒ»¶þ.
Íò·Ö¸Ðл°¡.
http://download.csdn.net/source/566130
......
ÎÒÓÃXmlDocumentÉú³ÉXML
XmlElement remarkNode = node.OwnerDocument.CreateElement("remark");
remark1Node.InnerXml = "";
Èç¹ûInnerXml¸³Öµ²»Îª¿Õ£¬ÔòÉú³ÉµÄ±ê¼ÇÊÇûÎÊÌâµÄ£¬±ÈÈ磺<r ......