Hi all.
I have simple class:
public class TestMappingClass {
List<String> texts = new ArrayList<String>();
public List<String> getTexts() {
return texts;
}
public void addText(String text) {
texts.add(text);
}
public void setTexts(List<String> texts) {
this.texts = texts;
}
}
mapping for this class:
<m:class name="test4.TestMappingClass">
<m:map-to xml="test"/>
<m:field name="texts" collection="arraylist" type="java.lang.String"
set-method="addText" get-method="getTexts">
<m:bind-xml name="value" node="attribute"
location="texts/text"/>
</m:field>
</m:class>
and xml that I want to unmarshall:
<?xml version="1.0" encoding="Windows-1251"?>
<test>
<texts>
<text value="Hello2"/> +
<text value="Hello with space"/>
</texts>
</test>
In unmarshall object I have four elements:
Hello2,Hello,with,space.
How I can declare mapping to unmarshall this xml correct?
--
With best regards, Pokidov N. Dmitriy