Castor XML follows the syntax rules of XML...so if you want Castor to
ignore the <br/> then you have two options:

1. Change it to the following:

  <name><![CDATA[aaaa <br/> bbbb]]></name>

or

2. Change it to the following:

<name>aaaa &lt;br/&gt; bbbb</name>


--Keith


Dario Di wrote:
> 
> Hi all,
> I'm using Castor to unmarshall xml files; I am using
> an xsd schema but not using a name space;
> 
> I have the following problem:
> when unmarshalling a string element like this:
> 
> <name>aaaa <br/> bbbb</name>
> 
> I'd like castor to ignore the <br/> i.e. to treat it
> as text and bind the whole string 'aaaa <br/> bbbb'
> to the string name.
> 
> I've tried to use the setIgnoreExtraElements option of
> the unmarshaller, but I get the error:
> 
> Element 'name' must have no element information item
> [children].
> 
> So should I ignore unknown children? How can I do it?
> 
> Thanks for your help!
> Castor is great!!
> 
> Dario
> 
> ______________________________________________________________________
> Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il 
> filtro Anti-spam
> http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to