The trick was the following replacing
<field name="Value"
type="java.lang.String">
<bind-xml name="Expression" node="element"/>
</field>
with
<field name="Value" type="string">
<bind-xml node="text"/>
</field>
kkrikor wrote:
>
> Hey guys ,
>
> I am having a problem unmarshalling the following xml
>
> <Obj>
> <Expression Context="RFv1.0">Color == YELLOW</Expression>
> </Obj>
>
> Now as you can see the expression tag has both a context and text. I have
> tried 2 things in my mapping file.
>
> 1.
> ----------------------------------------------------------------
> <class name="Obj" auto-complete="true">
> <field name="Expression"
> type="Expression">
> <bind-xml name="Expression"/>
> </field>
> </class>
> <class name="Expression">
> <field name="Context"
> type="java.lang.String">
> <bind-xml name="Context" node="attribute"/>
> </field>
> <field name="Value"
> type="java.lang.String">
> <bind-xml name="Expression" node="element"/>
> </field>
> </class>
>
> -----------------------
> Now this is throwing an exception saying Illegal Text data found as child
> of: Expression .
>
> 2.
> ----------------------------------
> <class name="Obj" auto-complete="true">
> <field name="ExpressionValue"
> type="java.lang.String">
> <bind-xml name="Expression" node="element"/>
> </field>
> <field name="ExpressionContext"
> type="java.lang.String">
> <bind-xml name="Context" node="element"/>
> </field>
> </class>
> -----------------------------------------------------
> And this one is always returing ExpressionContext null .
>
> So any clues on what to do with this a line like this ?
> <Expression Context="RFv1.0">Color == YELLOW</Expression>
>
> Thank you
>
>
>
--
View this message in context:
http://www.nabble.com/Problem-Un-marshalling-%3CExpression-Context%3D%22RFv1.0%22%3EColor-%3D%3D-YELLOW%3C-Expression%3E-tp16055201p16081400.html
Sent from the Castor - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email