velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Brisson <cla...@renegat.net>
Subject Re: XML and velocity
Date Thu, 02 Dec 2004 13:09:45 GMT
On Thu, 2004-12-02 at 12:48, Subbiah Raman wrote:
> Hi,
> I am trying to use a SAX parser in Velocity context and I need to do the 
> following
> 
> #set($temp = "$root.getRootElement().getChild("email").getText() )
> 
> But it throws
> org.apache.velocity.exception.ParseErrorException: Encountered "email"

There's an unclosed in your statement.
Also, you can simplify the syntax of the getters that take no argument.

Try :

#set($temp = $root.rootElement.getChild("email").text )

Claude



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message