当前位置:编程学习 > VB >>

请问如何比较组织数中节点的属性?

有这样一段程序:
set sNodes1=xmlOrganization.selectNodes("/Navigation/Navigator/Navigator/Navigator[@ID='"&nodeitem.getAttribute("ID")&"']/Navigator[@existStatus='0']")
for each nodeitem1 in sNodes1
set node=xmlDoc.selectSingleNode("/Navigation/ABC/Company[@ID='"&nodeitem.getattribute("ID")&"']")
Set newNode = xmlDoc.createElement("Department")
newNode.setAttribute "ID",nodeitem1.getattribute("ID")
newNode.setAttribute "Title",nodeitem1.getattribute("Title")
node.appendChild (newNode)
set newNode=nothing
set node=nothing
'{{{{{{{
strmaincomp=replace(nodeitem1.getAttribute("ID"),"C","")
set sNodes2=xmlOrganization.selectNodes("/Navigation/Navigator/Navigator/Navigator/Navigator[@ID='"&nodeitem1.getAttribute("ID")&"'and @existStatus='0']/Navigator/Navigator[@Maincomp='"&strmaincomp&"' and @existStatus='0']")
for each nodeitem2 in sNodes2
set node=xmlDoc.selectSingleNode("/Navigation/ABC/Company/Department[@ID='"&nodeitem1.getattribute("ID")&"']")
Set newNode = xmlDoc.createElement("Person")
newNode.setAttribute "ID",nodeitem2.getattribute("ID") newNode.setAttribute "Title",nodeitem2.getattribute("Title")
'newNode.setAttribute "Attend",attend(nodeitem2.getattribute("ID"))
if application("online:"&nodeitem2.getattribute("ID"))<>"" and datediff("d",application("online:"&nodeitem2.getattribute("ID")),now)=0  then
stronlinecheck="在线"&application("online:"&nodeitem2.getattribute("ID"))&"<br>"&application("ip:"&nodeitem2.getattribute("ID"))
end if
newNode.setAttribute "online",stronlinecheck&"<br>"
node.appendChild (newNode)
set newNode=nothing
set node=nothing
next
set sNodes2=nothing
我想在node2或者nodeitem2中做个属性的比较,和创建的Person对象相同的才进行在线情况的输出,如果不同就继续循环.
请问应该怎么做? --------------------编程问答-------------------- UP
补充:VB ,  网络编程
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,