Matt-
I haven't used it myself, but I think what you want to look into is
Castor's AnyNode support. I don't know as there is a lot of
documentation available, but I think if you search the mail archives
for AnyNode, you might find some helpful discussions. Sorry I can't
be of more help.
Stephen
On 3/28/06, Matt Secoske <[EMAIL PROTECTED]> wrote:
> 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