How to find ordinal position of an element in XML using VBScript & XPATH

Posted by chazzuka on Stack Overflow See other posts from Stack Overflow or by chazzuka
Published on 2010-04-21T08:48:02Z Indexed on 2010/04/21 10:03 UTC
Read the original article Hit count: 220

Filed under:
|
|
|

I have an XML like this

<response>
<doc>
    <arr name="URL"><str>string</str></arr>
    <arr name="ID"><int>1</int></arr>
</doc>
<doc>
    <arr name="URL"><str>string</str></arr>
    <arr name="ID"><int>2</int></arr>
</doc>
<doc>
    <arr name="URL"><str>string</str></arr>
    <arr name="ID"><int>3</int></arr>
</doc>
</response>

How to get the ordinal position of doc element which has element arr(1)/int text = 2

I am Using Classic ASP

thanks

© Stack Overflow or respective owner

Related posts about vbscript

Related posts about asp-classic