Enrique,
 Could you send me a snippet of code how are you
trying to do this?
If you have succeded marshalling your objetcs, I
think is not a big deal making unmarshalling.

Pedro.



From: "Arnaud Blandin" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] can Castor do it???
Date: Mon, 11 Nov 2002 14:18:13 +0100

Hi Enrique,

Why not using the Source Generator to generate the java object model
from the schema?
The mapping API intends to provide information mostly on the java model
you want to marshal to xml and unmarshal from xml. It doesn't define an
XML grammar by itself (even though it lets you specify some XML
datatyping). What you are asking for is typically the expression of an
XML Schema rule thus in that case the solution is to use the Source
Generator.

Hope that helps,

Arnaud

-----Original Message-----
From: Enrique Rodríguez [mailto:erodriguez@;nht-norwick.net]
Sent: Monday, November 11, 2002 2:01 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] can Castor do it???

Past week i asked for a solution to my problem. i Have to marshall and
unmarshall an xml document like this...

<Range>
    <RangeQualifier>Description</RangeQualifier>
    <RangePrecision>From</RangePrecision>
    <RangeValue>15</RangeValue>
    <RangePrecision>To</RangePrecision>
    <RangeValue>45</RangeValue>
</AudienceRange>
RangePrecision and RangeValue always are joined, and as you can see, can
be repeatable.
the xml-schema can support this, but "I think", castor not.
If anybody know how can I do it, PLEASE, help me.
Now, i can make the unmarshal process with something like that:
        <field name="setValues"
               type="RangePrecisionValue"
               collection="vector"
              
set-method="addRangePrecisionValue">                              
               <bind-xml node="element" matches="*"/>
        </field>
I add some code to the method addRangePrecisionValue. In this method i
receive all the tags values and create the objects I need. But I don't
find any clue with the marshall process.
Regards, Enrique.

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

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail

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

Reply via email to