0
votes
<xml>
    <category date="5/21/2012">
        <item>14</item>
    </category>
</xml>

In cell A1 I have the following function:

=ImportXML("http://www.site.com/file.xml", "//@date")

And it successfully loads all the attribute values of name "date".

Now in B1 I want to load the "item" that has the date in A1. I know the following is wrong but an idea of where I am trying to go:

=ImportXML("http://www.site.com/file.xml", "//@date["&A&ROW()&"]/item")

Thank you in advance.

1

1 Answers

0
votes

Solution:

=ImportXML("http://www.site.com/file.xml", "//category[@date='"&INDIRECT("A"&ROW())&"']/item")