views:

117

answers:

1

Hi all, this is my first question here, so please be gentle ;)

I'm trying to loop through a list of items, and use the value of each item in an XPath expression:

Works:

<c:forEach var="item" items="${items}">                         
    <x:out select="$some_xml//results[@attr1='some_val']/@attr" />
</c:forEach>

Fails:

<c:forEach var="item" items="${items}">                         
    <x:out select="$some_xml//results[@attr1=$item]/@attr" />
</c:forEach>

The error is: resolveVariable for variable item returning null

How can i use the "item" var inside that XPath expression?

A: 

fixed...it was working after all :)

Caleb
Glad to hear. Please delete question as it's no longer relevant :)
BalusC
It is relevant to me! Please leave this article.
robnardo