;
帖子
3919 
精华
积分
11710 
鱼币
0 ¥ 
来自
大连 
在线时间
1858 小时 
注册时间
2007-6-11 
最后登录
2009-10-20 

贴图大师勋章新人进步勋章宣传大使勋章论坛元老勋章

3
发表于 2009-1-5 19:48 | 只看该作者
鍒╃敤ASP鍙戦佸拰鎺ユ敹XML鏁版嵁鐨勫鐞嗘柟娉 - 缂栫▼搴 - Powered by SupeSite

浣犵殑浣嶇疆锛缂栫▼搴 >> 璧勮 >> 缃戠珯缂栫▼ >> ASP >> 璇︾粏鍐呭 鍦ㄧ嚎鎶曠ǹ

鍒╃敤ASP鍙戦佸拰鎺ユ敹XML鏁版嵁鐨勫鐞嗘柟娉

鍙戝竷: 2008-6-27 11:51 |  浣滆: admin |   鏌ョ湅: 9娆

銆銆鍥犱负瑕佸仛绉诲姩姊︾綉WAP鐨勪竴浜涙帴鍙o紝鎵浠ヨ鐢ㄥ埌杩欑鏂瑰紡锛屾帴涓嬫潵浼氭湁ASP.net鐗堟湰鐨勶紝杩欎釜鏄疉SP鐗堟湰鐨勶紝鍒╃敤浜哅SXML2.XMLHTTP瀵瑰儚銆

銆銆 request.asp

dim Https

set Https=server.createobject("MSXML2.XMLHTTP")

'瀹氫箟涓涓猉MLHTTP瀵瑰儚

Https.open "POST","http://127.0.0.1/testpost/response.asp",false

Https.send "echo

123456987654

1111122222"

if Https.readystate=4 then

銆response.write "鎻愪氦鎴愬姛"

銆'readstate璇诲彇鐘舵佷负4鍒欐垚鍔燂紝缁х画鍚庨潰鐨勶紝涓嶆垚鍔熷綋鐒跺氨涓嶇敤缁х画澶勭悊浜

銆dim objstream

銆set objstream = Server.CreateObject("adodb.stream")

銆'瀹氫箟涓涓猻tream锛屽洜涓鸿杩囨潵鐨勭洿鎺ユ嬁鍑烘潵鏄贡鐮佺殑锛屾墍浠ュ緱澶勭悊涓涓

銆objstream.Type = 1

銆objstream.Mode =3

銆objstream.Open

銆objstream.Write Https.responseBody

銆objstream.Position = 0

銆objstream.Type = 2

銆objstream.Charset = "GB2312"

銆html = objstream.ReadText

銆'杞ソ鐮侊紝灏辨斁鍒癶tml閲岋紝濂藉叧闂繖浜涘鍍

銆objstream.Close

銆set objstream = nothing

銆set https=nothing

end if

response.write html

response.asp

'鍒涘缓DOMDocument瀵硅薄

Set xml = Server.CreateObject ("msxml2.DOMDocument")

xml.async = False

'瑁呰浇POST鏁版嵁

xml.Load Request

If xml.parseError.errorCode <> 0 Then

銆response.write "涓嶈兘姝g‘鎺ユ敹鏁版嵁" & "Description: " & xml.parseError.reason & "锛渂r锛濴ine: " & xml.parseError.Line

End If

set blogchild=xml.getElementsByTagName("misc_command")

'the_text=blogchild.item(0).childnodes(1).text

'the_text=blogchild.item(0).text

'for i=0 to blogchild.length-1

response.write the_text

銆銆鍒╃敤杩欑鏂规硶锛孉SP閲岃皟鐢⊿ervlet鎴朩eb Service閮芥槸寰堣交鏉剧殑锛

鎵撳嵃 | 鏀惰棌姝ら〉 |  鎺ㄨ崘缁欏ソ鍙 | 涓炬姤
涓婁竴绡 涓嬩竴绡
 

璇勫垎锛0

鍙戣〃璇勮
鏌ョ湅鍏ㄩ儴鍥炲銆愬凡鏈0浣嶇綉鍙嬪彂琛ㄤ簡鐪嬫硶銆