Hello,
I am trying to fit this:
<root>
<inner attribute="innerAttribute">
<data>Inner Data 1</data>
<data>Inner Data 2</data>
</inner>
<outer>Regular String Data</outer>
<inner2>
<misc>Misc xml to be dealt with later</misc>
</inner2>
</root>
into this:
package bizobj;
public class Root {
String innerData;
String outerData;
Object innerData2;
public String getInnerData() {
return innerData;
}
public void setInnerData(String innerData) {
this.innerData = innerData;
}
public String getOuterData() {
return outerData;
}
public void setOuterData(String outerData) {
this.outerData = outerData;
}
public Object getInnerData2() {
return innerData2;
}
public void setInnerData2(Object innerData2) {
this.innerData2 = innerData2;
}
}
... and the mapping file I am using:
<?xml version="1.0"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
"http://castor.org/mapping.dtd
">
<mapping>
<class name="bizobj.Root">
<field name="innerData" type="string" >
<bind-xml name="inner" node="element" />
</field>
<field name="outerData" type="string">
<bind-xml name="outer" node="element" />
</field>
<field name="innerData2" type="java.lang.Object">
<bind-xml name="inner2" node="element" />
</field>
</class>
</mapping>
So, innerData2 (java.lang.Object) works just fine, while I cannot seem to get innerData (string) to work, regardless of handlers or config. Using the innerData2 (Object) approach will not work for various external reasons... Any ideas?
Regards,
--
Matt Secoske
- [castor-user] Trying to map section of xml structure into ... Matt Secoske
- Re: [castor-user] Trying to map section of xml struct... Stephen Bash
- Re: [castor-user] Trying to map section of xml st... Matt Secoske
- Re: [castor-user] Trying to map section of xm... Ralf Joachim
- Re: [castor-user] Trying to map section o... Matt Secoske
- Re: [castor-user] Trying to map sect... Stephen Bash
- Re: [castor-user] Trying to map ... Matt Secoske
- Re: [castor-user] Trying to ... Werner Guttmann
- Re: [castor-user] Trying to ... Matt Secoske
- Re: [castor-user] Trying to ... Ralf Joachim
- Re: [castor-user] Trying to ... Matt Secoske

