I am using Betwixt to output XML from a Java class, using .betwixt files to configure the mapping.
I am required to output some XML like this ( 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>
My class has a method which returns a list of StatusCount objects
List<StatusCount> getStatusCounts() {
My StatusCount Object has:
String getStatusName() { ... }
String getStatusCount() { ... }
I can't work out the betwixt config to get the output I want. I get an extra element wrapping each pair of Status/StatusCount nodes, which I don't want.
Is it possible not to have this element? Thanks for any help!