Title: Message
Keith / Anyone- I still haven't been enlightened on the technique you outlined below. :) Any help would be appreciated!!
 
Thanks,
Brent
-----Original Message-----
From: Brent Picasso
Sent: Friday, March 26, 2004 5:51 AM
To: [EMAIL PROTECTED]
Subject: RE: [castor-dev] marshalling/unmarshalling with variable or abitrary xml

Thanks for the reply- an interesting solution.
 
How would that be expressed in a mapping file? Would it be possible to still perform round trip marshalling and demarshalling?
 
Thanks,
Brent
 


From: Keith Visco [mailto:[EMAIL PROTECTED]
Sent: Fri 3/26/2004 1:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] marshalling/unmarshalling with variable or abitrary xml




Hi Brent,

Have you thought about using an extension element in your schema
something like:

<xsd:element name="extension">
   <xsd:complexType>
      <xsd:sequence>
         <xsd:any/>
      </xsd:sequence>
   </xsd:complexType>
</xsd:element>

??

Castor can unmarshalling anything contained in the <extension> element
into an org.exolab.castor.types.AnyNode.

Anyway, just a thought.

--Keith

> Brent Picasso wrote:
>
> Hello,
>
> We've been using castor for a while now, and we've come up with the
> need to marshall/unmarshall XML structures that may contain variable
> or arbitrary XML data.
>
> Part of the XML structure will be known, and another part will be
> "user defined" at runtime and therefore variable in it's structure.
> (like user defined values)
>
>
> What would be a good approach for getting this to work?
>
> I was thinking of a few approaches:
>
> - using a property bag approach- values are stored in HashMaps instead
> of discrete bean properties;
> - dynamically code-gen a java class and mapping file at runtime and
> using reflection to read the values (ugly)
> -???
>
> I don't think this is an uncommon scenario- I hope someone has already
> put some thought into this.
>
> Thanks for any help.

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

Reply via email to