Smooks XML to Java Mapping

View: New views
1 Messages — Rating Filter:   Alert me  

Smooks XML to Java Mapping

by AnuragTripathi :: Rate this Message:

| View Threaded | Show Only this Message

Hi All,
I have a following class:
public class SampleClass {
        private ArrayList<String> list;
        public ArrayList<String> getList() {
                if(list==null)
                        list= new ArrayList<String>();
                return list;
        }
}
This class doesn't provide a setter method to set the array list.
I have a sample XML:
<row><list>Data</list></row> which is being returned from data base.
I want to populate the list node's value in list element of SampleClass objcet.
Please tell me how to map them.