您的位置:程序门 -> web 开发 -> asp



asp怎么取得xml中的数据?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


asp怎么取得xml中的数据?
发表于:2007-01-13 14:07:50 楼主
我想用asp取得xml文件中的值,怎么搞???
发表于:2007-01-13 14:10:511楼 得分:0
这个xml文件在哪里?
发表于:2007-01-13 14:27:042楼 得分:0
参考:
http://blog.csdn.net/dh20156/archive/2005/05/10/373533.aspx
发表于:2007-01-13 15:08:353楼 得分:0
快点帮我搞出来啊!!!不然我哭了
发表于:2007-01-13 18:41:264楼 得分:0
set   ttt=xmldom.selectsinglenode( "//root/xxx/xx ")
response.write   ttt.text
发表于:2007-01-14 13:01:305楼 得分:0
我在自己的asp+xml的书签上用的方法:

list.xml
----------------------
<?xml   version= "1.0 "   ?>  
  <长明灯的收藏夹>
    <asp以及xml>
  <li>
    <title> 中南大学2007年硕士生入学考试参考书目 </title>  
    <url> http://www.csu.edu.cn/chinese/organization/xingzheng/gra_school/yzb/2007sscksm.htm </url>  
    <content> 政治(单):《马克思主义哲学原理》谭希培编,中南大学出版社,2004年8月 ¦ ¦   数学(单):《高等数学》(上、下册),同济大学主编 ¦ ¦   高等代数:《高等代数》北京大学编,人民教育出版社   ¦ ¦   计算机网络基础:《计算机网络》andrew   s.   tranenbaum,清华大学出版社,2000年(第三版) ¦ ¦   数据结构:《数据结构》严蔚敏,清华大学出版社(任一版本) ¦ ¦   △计算机应用基础:《计算机软件技术基础》麦中凡等,高教出版社 ¦《c程序设计》(第二版)谭浩强,清华大学出版社 ¦ ¦ </content>  
    </li>
</asp以及xml>
</长明灯的收藏夹>

asp中读取关键部分代码
----------------------------------------
set   root1=xmlmorntekdocument.documentelement.selectsinglenode( "//长明灯的收藏夹/asp以及xml ")
set   list1=root1.childnodes
'set   node=list1.nextnode()   '正序访问
set   node=list1(i)   '集合访问
<a   href= <%=node.selectsinglenode( "url ").text%>   target= "_blank "> <%=node.selectsinglenode( "title ").text%> </a>
......
发表于:2007-01-14 21:09:016楼 得分:0
哪位大哥能不能告诉我怎么开始学习asp技术
发表于:2007-01-15 09:57:457楼 得分:0
cpp2017(慕白兄)问的对:

这个xml文件在哪里?
发表于: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)
%>




快速检索

最新资讯
热门点击