commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray <>
Subject [Commons Digester] Newbie (ish) help with odd structure
Date Sat, 14 May 2005 09:14:40 GMT
Hi there ... :-)

I wonder if someone could help me out with this problem.  I'm trying to 
put together some Commons Digester XML rules, to fill the following Java 

public class Request {

    private DataItem data = new DataItem();

    public DataItem getDataItem();

    public void setDataItem(DataItem dataItem);


public class DataItem {

    private DataString name = new DataString();
    private DataString postcode = new DataString();

    public DataString getName();
    public void setName(DataString name);
    public DataString getPostcode();
    public void setPostcode(DataString postcode);


public class DataString {

    private String value;

    public String getValue();
    public void setValue(String name);


Okay, I have the following XML data


My problem is getting the Name and Postcode Elements into the DataString 
objects, since they don't map exactly. I was trying something like

<call-method-rule pattern="Name" methodname="getName.setValue"/>

But I appear to be on the wrong track with this.

Nay help would be greatly appreciated. Thanks.

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

View raw message