You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by ma...@anorakgirl.co.uk on 2011/10/20 10:53:54 UTC

[betwixt] writing a collection without enclosing each set of nodes

Hi,

I have a class which I am writing to XML, with a method:

List<StatusCount> getStatusCounts() {

The StatusCount object has the methods:

String getStatusName() { ... }
String getStatusCount() { ... }

I want to output the following XML fragment (I have to conform to a  
third party DTD):

<data>
    <Status>Active</Status>
    <StatusCount>3</StatusCount>
    <Status>InActive</Status>
    <StatusCount>5</StatusCount>
    <Status>Banned</Status>
    <StatusCount>1</StatusCount>
</data>

I am using .betwixt files to configure my output, as the node names  
don't match the property names. I can't work out how to do this - each  
Status/StatusCount node is wrapped in a tag. Is this possible?

Thanks!
Tamsin

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