You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Rik Scarborough <ri...@gmail.com> on 2010/08/03 20:11:03 UTC
[betwixt] Additional element on writing collections
If I have a bean that contains an array of another bean, when I write out
the XML, there is an additional element name added.
For instance.
public class ObjectTypes {
private ObjectType[] object
....
}
The writer will output
<ObjectTypes>
<Object>
<Object>
.....
I don't seem to see a way to fix this.
~Rik
Re: [betwixt] Additional element on writing collections
Posted by Rik Scarborough <ri...@gmail.com>.
Found there is a flag for this.
XMLIntrospector.setWrapCollectionsInElement(false).
~Rik
On Tue, Aug 3, 2010 at 1:11 PM, Rik Scarborough <ri...@gmail.com> wrote:
> If I have a bean that contains an array of another bean, when I write out
> the XML, there is an additional element name added.
>
>
> For instance.
>
> public class ObjectTypes {
> private ObjectType[] object
> ....
> }
>
> The writer will output
>
> <ObjectTypes>
> <Object>
> <Object>
> .....
>
>
> I don't seem to see a way to fix this.
>
> ~Rik
>