【问题标题】:Read XML Root Attribute Value in Classic ASP在经典 ASP 中读取 XML 根属性值
【发布时间】:2013-06-03 17:02:31
【问题描述】:

我有以下 XML

<response key="12345">
  <colours>
  <colour>Red</colour>
  <colour>Blue</colour>
  </colours>
</response>

在经典 ASP 中,我如何访问根元素中键的值。

【问题讨论】:

    标签: xml asp-classic root


    【解决方案1】:

    here

    dim xmlDoc : set xmlDoc = sever.createobject("Msxml2.DOMDocument.6.0")
    dim node : set node = xmlDoc.selectSingleNode("//response")
    dim attrValue : attrValue = node.getAttribute("key")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多