commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@anorakgirl.co.uk
Subject [betwixt] writing a collection without enclosing each set of nodes
Date Thu, 20 Oct 2011 08:53:54 GMT
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


Mime
View raw message