wouldn't the xml have to be:
<html-node>
    This is a &lt;b&gt;BOLD text&lt;/b&gt;
</html-node>

so that the entire content of the <html-node> tag is treated as a just text.
Jay Goldman


-----Original Message-----
From: Dragos Haiduc [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 26, 2004 2:59 AM
To: [EMAIL PROTECTED]
Subject: [castor-user] Mapping only one eleemnt



Try something like this:

  <class name="com.mycontent.HtmlNode">
      <map-to xml="html-node"/>
      <field name="nodeContent" type="string">
         <bind-xml node="text"/>
      </field>
   </class>

Hope this helps,
Dragos

Razvan Batin wrote:

> I have the following xml file
>  
> <html-node>
>     This is a <b>BOLD text</b>
> </html-node>
>  
> an a mapping element which looks like this:
>  
> <field name="content" type="java.lang.String">
>           <bind-xml name="html-node" node="element" />
>     </field>
>  
>  
>     I wan`t to get the context of <html-node> as a string but castor 
> interprets also the <b> fiels and return an exception.
>     How can I do this?
>  
>     Thanks,
>     Razvan
>  
>
>------------------------------------------------------------------------
>
>----------------------------------------------------------- 
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
>        unsubscribe castor-user
>  
>



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

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

Reply via email to