Hi,

We're using castor to take a simple java class and marshal to xml.  we save that xml 
into the database and then unmarshal the data back to an object for presentation.  the 
class that we're marshalling was generated by castor from an xml schema.  the schema 
used goes something like this:

<?xml version="1.0"?>

<schema xmlns="http://www.w3.org/2001/XMLSchema";>
<element name="Response">
        <complexType>
                <sequence>
            <element name="recordId"            type="string"/>
            <element name="dataTrans"           type="string"/>

My understanding is that the sequence is suppose to ensure the elements are all in the 
same order starting with recordId, dataTrans, etc.  The issue is that when marshaling 
the data from an instance of the Response class that was created, the xml elements 
aren't in order.  I don't see a way to pass a schema into the Marshaler to have it 
enforce the schema definition at all.  Basically, is it possible for me to make sure 
my class follows the schema definition when being marshalled?  

btw, my Response class has a marshal( writer) method, but we're using the static 
method of the Marshaler to unmarshal.  would using the class method resolve this?

thanks!
~mark

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

Reply via email to