Thread: JSTL, XML query
View Single Post
  #2 (permalink)  
Old January 26th, 2006, 08:11 AM
ph3n0m ph3n0m is offline
Registered User
Join Date: Jan 2006
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

<x:out select="string(enclosure/@url)"/> - is how I pulled the url value out of the xml file, so my page now looks like this

<c:import var="xmlfile" url="" />
<x:parse var="doc" xml="${xmlfile}"/>
<table border="0" cellspacing="0" cellspacing="0">
<x:forEach select="$doc//item" end="9">
<tr><td><strong><a href='<x:out select="link"/>'><x:out select="title"/></a></strong><br>
<em><x:out select="pubDate"/></em><br>
<a href='<x:out select="link"/>'><img src='<x:out select="string(enclosure/@url)"/>' alt='<x:out select="title"/>' border='0'></a></td></tr>

and it works perfectly
Reply With Quote