commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Vinson <>
Subject [Jelly] Problem Parsing Xml Nodes
Date Fri, 07 Oct 2005 13:00:43 GMT
Hi everyone,

I'm attempting to use the xml tags from Jelly to parse an xml document and
pull out text values.  I've included my jelly script and sample xml below.
I've also written a simple tag processor that I can insert as a "breakpoint"
of sorts in my script, which is the x:debugger tag below.

The problem I am seeing is that when I use an xpath expression to get the
text of a node, I get a NumberFormatException on the .text.  Can anyone
point me in the right direction?  If I don't use text, I get an ArrayList of
DefaultElements, which isn't what I want either.  Thanks for any pointers.



  <x:parse xml="${input}" var="doc"/>

  <x:set var="records" select="$doc/records/record"/>
  <j:forEach var="record" items="${records}">
    <x:set var="lastName" select="$record/person/names/last_name"/> 

    <t:debugger content="${lastName.text}" label="bp1"/>





To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message