| 发表于:2007-06-07 05:48:518楼 得分:0 |
<% on error resume next ' <![cdata[]]> 问题没处理 xmlfile = server.mappath( "???.xml ") set xml = server.createobject( "msxml.domdocument ") xml.async = false xml.load(xmlfile) private function showxml(node) dim tempstr for each i in node if i.nodetype = 1 then tempstr = " <b> " & i.nodename & " </b> " tempstr = replace(tempstr, "#text ", " ") response.write tempstr end if if i.nodetype = 3 then tempstr = " <i> " & i.nodevalue & " </i> <br> " response.write tempstr end if if i.nodename <> "#text " then for each b in i.attributes response.write "[ " & b.name & ": " & b.value & "] " next response.write " <br> " end if if i.haschildnodes then showxml(i.childnodes) end if next end function showxml(xml.documentelement.childnodes) %> | | |
|