Hi,
I'm building the XML in the VTL.
At some point I retrieve the value of an element and set its text as
$elem.setText( $sometext )
#foreach($elem in $rootelem.getChildren())
#set ($elemname = $elem.getName())
#set( $sometext = $userprops.get($elemname) )
$elem.setText( $sometext )
Hi,
Use as below
#foreach($elem in $rootelem.getChildren())##
#set ($elemname = $elem.getName())##
#set( $sometext = $userprops.get($elemname) )##
#set($tempVariable = $elem.setText( $sometext ))##
#end##
to ignore the return value from setText, just pretend as assigning to a
variable (
I used a macro for this purpose
##
## convenience directive to invoke a method and ignore the return value
##
#macro( call $foo )#if($foo)#**##end#end