Araund, All,

Thanks for the reply.  That tag is new to me, in fact schemas are new to me.
I've been using the Invoice.xsd and a couple tools to get up to speed.

I did some quick research on "any" and tried a few things out, so bear with
me wile I try to wrap my brain around this.

I have generated a simple example xsd (attached).

When I generate source from this, I get a Square class as expected.  It has
the get methods getWidth(), getHeight(), and getAnyObject().

The getAnyObject returns a java.lang.Object instance, fine.  But what object
class is castor instantiating and putting my xml data into?

Also, getAnyObject returns an array, why is that?  How could it consider
everything between the <square></square> tags as anything other than one
large blob?

Thanks for the help!
Michael

> -----Original Message-----
> From: Arnaud Blandin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 30, 2001 1:31 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] Trouble with schema
>
>
> Hi Michael,
>
> you should use <any>
>
> Hope this helps,
>
> Arnaud
>
> -> -----Original Message-----
> -> From: Michael Young [mailto:[EMAIL PROTECTED]]
> -> Sent: Tuesday, October 30, 2001 11:22 AM
> -> To: [EMAIL PROTECTED]
> -> Subject: [castor-dev] Trouble with schema
> ->
> ->
> -> Hi,
> ->
> -> I'm using castor to generate source code from and xsd file.  I'm having
> -> trouble figuring out how to define a schema element that works
> -> with castor
> -> and allows me to have an xml element like this:
> ->
> -> <myElement anAttribute="theValue">
> -> A bunch of CDATA
> -> </myElement>
> ->
> -> It seems simple enough right?  Any ideas?
> ->
> ->
> -> Cheers,
> -> Michael
> ->
> ->
> -> _________________________________________________________
> -> Do You Yahoo!?
> -> Get your free @yahoo.com address at http://mail.yahoo.com
> ->
> -> -----------------------------------------------------------
> -> If you wish to unsubscribe from this mailing, send mail to
> -> [EMAIL PROTECTED] with a subject of:
> ->    unsubscribe castor-dev
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
		targetNamespace="http://www.sample.org/Test/Schema";>

 <element name='square'>
  <complexType>
   <sequence>
   <any />
   </sequence>
   <attribute name='height' type='string' use='required'/>
   <attribute name='width' type='string' use='required'/>
  </complexType>
 </element>
</schema>

Reply via email to