asp解析xml
<%
dim xml
set xml = server.createobject("msxml2.domdocument")
xml.async = false
xml.load request
put_file_content xml.xml
sub put_file_content(byval str)
'将str写入一个txt文件,当远程服务器post数据到你的服务器时就可以看到该文件了
end Sub
%>
------上门的是接收的代码下面是服务器post过来的(有几个xml,(名字:RecvSMS,EchoOfSendSMS,NotifyStatus),推送过来的时间有先后).
NotifyStatus
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<NotifyStatus soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<eventID xsi:type="xsd:int">13</eventID>
<sessionID xsi:type="xsd:string">7878449</sessionID>
<res xsi:type="xsd:int">1</res>
<para1 xsi:type="xsd:string">15889505004</para1>
</NotifyStatus>
<NotifyStatus soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<eventID xsi:type="xsd:int">12</eventID>
<sessionID xsi:type="xsd:string">7878448</sessionID>
<res xsi:type="xsd:int">1</res>
<para1 xsi:type="xsd:string">15889505004</para1>
</NotifyStatus>
</soapenv:Body>
</soapenv:Envelope>
EchoOfSendSMS
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<EchoOfSendSMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ucNum xsi:type="xsd:string">07525143006</ucNum>
<cee xsi:type="xsd:string">15889505055</cee>
<msgid xsi:type="xsd:int">7878448</msgid>
<res xsi:type="xsd:int">1</res>
<recvt xsi:type="xsd:string">20100119105258</recvt>
</EchoOfSendSMS>
<EchoOfSendSMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<ucNum xsi:type="xsd:string">07525143007</ucNum>
<cee xsi:type="xsd:string">15889505052</cee>
<msgid xsi:type="xsd:int">7878449</msgid>
<res xsi:type="xsd:int">1</res>
<recvt xsi:type="xsd:string">20100119105256</recvt>
</EchoOfSendSMS>
</soapenv:Body>
</soapenv:Envelope>
RecvSMS
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RecvSMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<caller xsi:type="xsd:string">18938652200</caller>
<time xsi:type="xsd:string">20101126113634</time>
<cont xsi:type="xsd:string">x+u72LXno6zQu9C7o6E=</cont>
<ucNum xsi:type="xsd:string">075585578185</ucNum>
</RecvSMS>
<RecvSMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<caller xsi:type="xsd:string">18938652255</caller>
<time xsi:type="xsd:string">20101126113638</time>
<cont xsi:type="xsd:string">x+u72LXno6zQu9C7o6E=</cont>
<ucNum xsi:type="xsd:string">075585578188</ucNum>
</RecvSMS>
一个不懂asp的跪求大家了.