★★在线求助:关于asp获取xml节点内容问题
兄弟姐妹们,快帮忙一下呀!我有个远程获取的xml文件,要怎么样取dispname节点信息呀??xml文件如下:
:(<?xml version="1.0" encoding="gb2312"?>
<UserEntity xmlns:xsi="http://www. xmlns:xsd="http://www.
<OfficePhone>0791-87667697</OfficePhone>
<ID>2763C5B0DB03406CB39B038438D03863</ID>
<Account>dsfsfs</Account>
<Password />
<DisplayName>第三方</DisplayName>
<Birthday>1986-01-10T00:00:00</Birthday>
<Sex>男</Sex>
<Telephone>0532414324</Telephone>
<Mobile>134106365687</Mobile>
<Email>asdasd@
<Address />
<ULevel>0001</ULevel>
<Title>阿迪王</Title>
<Position>01</Position>
<CAID />
<AccountID>40645</AccountID>
<OrderID>10</OrderID>
<Organization>
<ID>6B80F89C3C086F09E040007F010027E3</ID>
<Name>生生世世</Name>
<ShortName>地地道道</ShortName>
<Code>4822066XX</Code>
<ParentID>0</ParentID>
<WebUrl />
<Fax>-</Fax>
<Address>
<State>福建省</State>
<City>福州市</City>
<Borouth>鼓楼区</Borouth>
<Street>福州市</Street>
</Address>
<AreaCode>3501202</AreaCode>
<PostCode>350000</PostCode>
<Manager>A3C7B07775A049D2897A6C4CA2D5ED51</Manager>
<Type>07</Type>
<ILevel>03</ILevel>
<Admini />
<Relation />
<OrderID>4704</OrderID>
<Remark />
<ExtendProperty />
</Organization>
<Department>
<ID>6BE16C46AD970DD1E040007F010002DB</ID>
<Name>信息中心</Name>
<ParentID>6B80F89C3C086F09E040007F010027E3</ParentID>
<InstitutionID>6B80F89C3C086F09E040007F010027E3</InstitutionID>
<WebUrl />
<Fax>-</Fax>
<Address>
<State>福建省</State>
<City>福州市</City>
<Borouth>鼓楼区</Borouth>
<Street>福州市</Street>
</Address>
<AreaCode>350102</AreaCode>
<PostCode>350000</PostCode>
<Manager />
<OrderID>22</OrderID>
<Remark />
<ExtendProperty />
<Type>1</Type>
</Department>
<Remark />
<ExtendProperty />
<Type>1</Type>
</UserEntity>)version="1.0" encoding="utf-8"
asp程序部分如下:
<script language="javascript" type="text/javascript">
//用户注销
function checkExit() {
var s = CreateSignonActiveXObject();
if (!existSignonActiveXObject) return;
s.WebSvcAddress = "http://10.26.90.15/SignonService/";
var c = s.UserLogoff();
s = null;
if (c) {
window.location.href="Login.asp";
}
else {
alert("调用WebService出错,无法注销");
}
}
</script>
<!-- 请在这里输入您的HTML代码 -->
<%
url = "http://10.26.90.15/SignonService/UserSignOn.asmx/GetUserInfo"
SoapRequest="guid="&request("id")
Set xmlhttp = server.CreateObject("Msxml2.XMLHTTP")
xmlhttp.Open "POST",url,false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.setRequestHeader "HOST","193.170.100.154"
xmlhttp.setRequestHeader "Content-Length",LEN(SoapRequest)
xmlhttp.Send(SoapRequest)
If xmlhttp.Status = 200 Then
Set xmlDOC = server.CreateObject("MSXML.DOMDocument")
xmlDOC.load(xmlhttp.responseXML)
showallnode "string",xmlDOC'调用SHOWALLNODE
Set xmlDOC = nothing
Else
Response.Write xmlhttp.Status&" "
Response.Write xmlhttp.StatusText
End if
Function showallnode(rootname,myxmlDOC)
if rootname<>"" then
set nodeobj=myxmlDOC.documentElement.selectSingleNode("//"&rootname&"")'当前结点对像
nodeAttributelen=myxmlDOC.documentElement.selectSingleNode("//"&username&"").attributes.length'当前结点属性数
if nodeobj.text<>"" then
returnstring=returnstring&"<BR>用户信息:("&nodeobj.text&")"
end if
response.write returnstring
response.write myxmlDOC.documentElement.selectSingleNode("//"&username&"").text '输出xml所有信息
set nodeobj=nothing
end if
End Function
%>
要怎么样取dispname节点信息呀??
[ 本帖最后由 seaull 于 2010-12-2 09:50 编辑 ]