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