Hi Baba,

at the moment Castor is not able to handle mixed content as reported at
http://jira.codehaus.org/browse/CASTOR-513

Regards
Ralf


Baba schrieb:
> Hi Castor Community,
> 
>  
> 
> I'm looking for an idea for the following problem. I have to read and
> write a XML File, which represent a text document. A basic problem of a
> text document is the order of the text elements and the order of the
> text. The first problem with the order of the text elements I found a
> solution which works. But for the order of the text between the elements
> I'am searching for a solution or an idea how to solve the problem.
> Here an example for the problem:
>  
> 
> <text:p text:style-name="*StVo_5f_Fett*">
> 
>   <checkBox />
> 
>   <bookmark name="*BM-1*" />
> 
>   *Your letter dated on *
> 
>   <calendar />
> 
> *  handel Mr. / Mrs*
> 
>   <bookmark text:name="*BM-2*" />
> 
> </text:p>
> 
>  
> 
> I marschal this XML with the following mapping file:
> 
>  
> 
> <class name="xml.objects.body.P">
> 
>       <map-to xml="text:p" />
> 
>      
> 
>       <field name="styleName" type="java.lang.String">
> 
>             <bind-xml name="text:style-name" node="attribute"/>
> 
>       </field>
> 
>            
> 
>       <field name="value" type="java.lang.String">
> 
>             <bind-xml node="text"/>
> 
>       </field>
> 
>            
> 
>       <field name="CheckBox" type="xml.objects.body.CheckBox" >
> 
>             <bind-xml name="checkBox" node="element"/>
> 
>       </field>
> 
>            
> 
> <field name="Bookmark" set-method="addBookmark"
> type="xml.objects.body.Bookmark" collection="arraylist">
> 
>             <bind-xml name="bookmark" node="element"/>
> 
>       </field>
> 
>            
> 
> <field name="Calender" set-method="addCalender"
> type="xml.objects.body.Calender" collection="arraylist">
> 
>             <bind-xml name="calender" node="element"/>
> 
>       </field>          
> 
> </class>
> 
>  
> 
> After the unmarschal of the object tree I get this XML:
> 
>  
> 
> <text:p text:style-name="*StVo_5f_Fett*">
> 
>   *Your letter dated on**  handel Mr. / Mrs*
> 
>   <checkBox />
> 
>   <bookmark name="*BM-1*"/>
> 
>   <calendar />
> 
>   <bookmark text:name="*BM-2*"/>
> 
> </text:p>
>  
> Regards
> Thomas

-- 

Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Internet: www.syscon.eu
E-Mail: [EMAIL PROTECTED]

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to