(anti)XMLProcessing : how to render a list of node as a comma separated list of their text ?
"thierry henrio" <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all
I need to render something like
data=
<bill>
<material>eggs</material>
<material>milk</material>
</bill>
as
output=
"eggs,milk"
at first, I though : "hey that does not look so difficult !!, that will be a
matter of minutes" ...
so I wrote a learning test : 2 minutes
now, I must admit my learning test is still red after 2 hours :(
so, is there anyone kind enough to teach me how to achieve this ??
note 1:
i rapidly produced the following output
"eggs,
milk
"
with template=
<#assign x>
<#list bill.material as x>
${x}<#if x_has_next>,</#if>
</#list>
</#assign>
${x}
but these \n are killing my test !!
note 2:
I'm angry to have to render in the xml output document something like that
<property name="badDesignedDataModel" value="value1, value2, value3"/>
where valueX are identified items in my xml data document
but that is it :)
Regards, Thierry
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user