当前位置: 代码迷 >> XML/SOAP >> 请问NODE.NAME
  详细解决方案

请问NODE.NAME

热度:451   发布时间:2012-03-04 11:13:33.0
请教NODE.NAME
<script runat="server">

sub page_load(ob as object,ev as eventargs)
dim xd as new xmldocument
dim root as xmlnode
xd.load(server.mappath("xml1.xml"))
root=xd.documentelement
search_tree(root)
xd.save(server.mappath("xml1.xml"))
end sub

sub search_tree(n as xmlnode)
dim xn as xmlnode
if n.haschildnodes=false then
  if n.value="25" then
  response.write(n.name)
  end if
end if
if n.haschildnodes=true then
  xn=n.firstchild
  while not isnothing(xn)
search_tree(xn)
xn=xn.nextsibling
  end while
end if
end sub
</script>


为什么节点的名称response.write(n.name)是#text

------解决方案--------------------
你试试 LocalName
  相关解决方案