tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rashmi Rubdi <dev_subscripti...@yahoo.com>
Subject Re: Is it possible to count number of XML nodes in a node-set with JSTL XML tags?
Date Fri, 08 Sep 2006 07:56:12 GMT
I did a bit more research on this, and came across XTags tag library. 
   
  It might be more suitable for what I'm trying to achieve.
   
  If that's the case, then i'll close this thread.
   
  
Rashmi Rubdi <dev_subscriptions@yahoo.com> wrote:
  I searched for a solution for this but couldn't find an answer.

I'm trying to count the number of book nodes from the xml below:



Book Title 1
Book Title 2
Book Title 3
Book Title 4
Book Title 5


I tried using XPath's count function, inside the JSP page, but it gives 0 instead of 
5 - (the number of book nodes)





Is it possible to obtain the count of a node set inside a JSP or do I have to first transform
the source XML into another XML which obtains the count and then read the count from the second
XML file?

-Rashmi

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message