HI Vijay,
I have enclosed the mapping-address.xml for ur reference.

Do we need to bind every field?
Pl let me know.
Thanks
Gopi

On 7/29/05, Vijayanand, M <[EMAIL PROTECTED]> wrote:

Hi Gopi,

Did you use bind-xml to bind the fields property to the element you are expecting.

 

 

  Thanks & Regards,
  Vijayanand M
HP Global Delivery India Center
Digital Park, II Floor, Software Block Dpd42 W-65
Off:   +91-80-26173065
Mobile: 9880061244
Email: [EMAIL PROTECTED]


From: Gopinath R [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 29, 2005 5:41 PM
To: [email protected]
Subject: [castor-user] Object to XML marshalling-order

 

Hi Castor Guru's,
I am using Castor-XML to convert my Java objects to XML file.
The marshalling is occuring fine , but the XML generated is not in order as specified in the mapping.xml file.
Is there any parameter to be changed in castor.properties for the same.
Pl let me know.

Thanks
Gopi


<?xml version="1.0"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN" "http://castor.exolab.org/mapping.dtd";>

<mapping>
<description>A mapping file for our Address Book application</description>

<class name="Person">
  <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
  </field>
  <field name="address" type="string" />
  <field name="ssn" type="string" />
  <field name="email" type="string" />
  <field name="homePhone" type="string" />
  <field name="workPhone" type="string" />
</class>

<class name="AddressBook">
  <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
  </field>
  <field name="persons" type="Person" collection="collection" />
</class>

</mapping>
-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to