commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Barbosa" <>
Subject Implicit Collection using Betwixt
Date Wed, 18 Oct 2006 21:21:02 GMT

I'm new to Betwixt, and I'm trying to transform this XML:

<Response version="0.2.928" xmlns="">
    <Title>Ilusionismo - Cris Angel</Title>
    <Description>Show de magica....</Description>
    <Description>Bla bla bla</Description>



into these Beans:

public class Response {

	private int IsError = -1;
	private List<Content> Contents = new ArrayList<Content>();

        public Response() {}

	public int getIsError() {
		return IsError;
	public void setIsError(int isError) {
		IsError = isError;
	public List<Content> getContents() {
		return Contents;
	public void addContent(Content content) {

But, as far as I understood, it's only possible if the "Content" tags
have a "container" tag, like "contents". Is that true?
I cannot recreate the XML, with the container tag, because its created
by another system.
I populated the "isError" propertie with no problem.

I found that Xstream has an "addImplicitCollection" method, that alows
exactly this. Does Betwixt has something like this? I'm looking
through the documentation and mail archive for 2 days now and couldn't
find how to do that. :-(

Any help is welcome.

Thanks a lot,
Leonardo Barbosa

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message