As far as I know, there's no way you can configure Castor according to
your needs.
Werner
Qureshi, Affan wrote:
> In both cases I want the text to be copied to a property of the Content
> object called "data"
>
> public class Content {
>
> /* <<< this is the field where whatever is there in the text node of
> <content> element should go*/
> public String data;
>
> public String identity;
> }
>
> Thanks,
>
> Affan
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 25, 2008 3:04 AM
> To: [email protected]
> Subject: Re: [castor-user] Treat Elements as Text node while unmarshalling
>
> Hi,
>
> in the second CASE (html),where would you want to store the context ?
>
> Werner
>
> Qureshi, Affan wrote:
>> Hi,
>>
>> I have an XML where one of the element's text node can either be a bunch of
>> text or some HTML. E.g
>>
>> <content identity="1025">
>> <IMG src="/images/temp/earn2.jpg" />
>> <IMG src="/images/temp/earn1.jpg" />
>> </content>
>>
>> <content identity="1025">
>> Some data
>> </content>
>>
>> The unmarshalling works perfectly fine when it is text or even html inside
>> CDATA. But I want Castor to populate a field of the class Content with
>> whatever is present.
>>
>> I understand that this is non-conforming but well-formed XML.
>>
>> Any ideas?
>>
>> Thanks a lot!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email