首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

请问NODE.NAME

2012-03-04 
请教NODE.NAMEscript runatserversub page_load(ob as object,ev as eventargs)dim xd as new xmldoc

请教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

热点排行