neildt
neildt

Reputation: 5352

Read XML Root Attribute Value in Classic ASP

I've the following XML

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

In Classic ASP how do I access the value of key in the root element.

Upvotes: 0

Views: 817

Answers (1)

ulluoink
ulluoink

Reputation: 2785

look here

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

Upvotes: 1

Related Questions