请问怎样用ASP读取XML中的某个结点属性

gwfjack 2006-07-15 11:14:35
XML:
<?xml version="1.0" encoding="gb2312"?>
<List>
<message>
<picture explain="生气">3.gif</picture>
<title>使用APS+XML实现BBS</title>
<author>gwf</author>
<time>2006-7-4</time>
<kick>1</kick>
<revert>0</revert>
<LastResponder></LastResponder>
<url>0.xml</url>
</message>
</List>


想读取<picture>结点下的explain,请帮帮忙,谢谢
...全文
148 4 打赏 收藏 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
gwfjack 2006-07-17
  • 打赏
  • 举报
回复
i
gwfjack 2006-07-16
  • 打赏
  • 举报
回复
显示出都都不会,随便教教,谢谢
<img src="picture/<%=picture.item(i).text%>" title="<%=result.item(i).value%>"/>

我是想<img>的title属性的值是XML文件explain值
phyllis2001 2006-07-15
  • 打赏
  • 举报
回复
result=xmldoc.selectSingleNode("//list/message/picture").getAttribute("explain")
BlueDestiny 2006-07-15
  • 打赏
  • 举报
回复
xmldoc.selectSingleNode("//picture").getAttribute("explain")

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧