XML¶ÁÈ¡ÎÊÌâ - Web ¿ª·¢ / ASP
<?xml version="1.0" encoding="UTF-8" ?>
<list version="3.0">
<title>title</title>
<book>
<type>
<id>1022</msgid>
<name>66</name>
</type>
......
<type>
<id>1023</id>
<name>77</name>
</type>
</book>
</list>
¶ÁÈ¡£º
Set XML = Server.CreateObject ("Microsoft.XMLDOM")
xml.async = False
xml.Load Request
set root=xml.documentElement
title= root.childNodes.item(0).text
Set oXMLItems = root.selectNodes("book")
oXMLtype=oXMLItems(0).selectNodes("type")
iLength = oXMLtype.length - 1
For i = 0 To iLength
Set oXMLItem = oXMLmessages.item(i)
id= oXMLItem.getAttribute("id")
name= oXMLItem.getAttribute("name")
Next
¸ßÊÖÖ¸µã´íÔÚÄİ¡¡£¡£¡£
<?xml version="1.0" encoding="UTF-8" ?>
<list version="3.0">
<title>title</title>
<book>
<type>
<id>1022</msgid>
<name>66</name>
Ïà¹ØÎÊ´ð£º
Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
<a>aaa
</a>
<b>bbb
</b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......
<?xml version="1.0" encoding="utf-8" ?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical&q ......
ÎÒÓÐÒ»¸öÀàËÆµÄxmlµÄ string£¬Ïëͨ¹ý±éÀúÔõô¸öxml Êä³öÎÒÏëÒªµÄelementµÄÖµ
xml Ϊ£º
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_XML_ME ......
<UserModel xmlns="http://tempuri.org/">
<Name>Liu</Name>
<Age>23</Age>
</UserModel>
ÔõôÓÃlinq to xml ²éѯ°ÑÉÏÃæµÄÒ»¸ö×Ö·û´® ͶӰ³ÉÒ»¸ ......
xmlÎļþ¸ñʽÈçÏÂ
XML code:
<?xml version="1.0" encoding="GB2312" ?>
<allproducts version="1.0">
<products>
<product name="prodId&quo ......