Hi Gene

I think you'll find the following document useful:

http://xmlbeans.apache.org/docs/2.0.0/guide/conMethodsForGeneratedJavaTy
pes.html

Cheers,

Lawrence

> -----Original Message-----
> From: Gene Holmerud [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 09, 2005 10:31 AM
> To: [email protected]
> Subject: Created accessor/mutator methods for attributes
> 
> Vaguely related to: How to limit the range of the integer type
> 
> I noticed his compile created a "get" method for his attribute value.
My
> compiles, instead, yield only methods such as get/setYTDRENTArray.
This,
> in turn, gives me strings of XML snippits that look like
"<xml-fragment
> year="1990">4200</xml-fragment>" rathar than the values "1990" and/or
> "4200".
> 
> I used getMethod(Reflection) to see what methods are generated as well
a
> scaning the generated source.  Is there a way to get/set the values
> directly?
> 
> My .xml file is structured as (excerpted for readability):
> ...
> <HOUSES xmlns="http://HOUSES";>
>     <HOUSE>
>        --some other (non-repeating) elements--
>        <YTD_RENT year="1990">4200</YTD_RENT>
>        --about 15 more of the above thru year="2005"--
>     </HOUSE>
>     --repeats of other houses--
> </HOUSES>
> 
> My schema (full copy attached) is structured:
> 
> <xs:schema ...
>     <xs:element name="HOUSES">
>               <xs:complexType>
>                     <xs:sequence>
>                               <xs:element name="HOUSE"
type="hse:houseElement"
> minOccurs="8"
> maxOccurs="8"/>
>                       </xs:sequence>
> ...
>     <xs:complexType name="houseElement">
>        <xs:sequence>
>           --the non-rpeating elements as type="xs:string"---
>           <xs:element name="YTD_RENT"      type="yr:ytdRentElement"
> minOccurs="0"
> maxOccurs="unbounded"/>
>       </xs:sequence>
>     </xs:complexType>
>     <xs:complexType name="ytdRentElement">
>        <xs:simpleContent>
>           <xs:extension base="xs:string">
>              <xs:attribute name="year" type="xs:ID"/>
>           </xs:extension>
>        </xs:simpleContent>
>     </xs:complexType>
> </xs:schema>
> 
> Gene
> 
> --
> Using M2, Opera's revolutionary e-mail client:
http://www.opera.com/m2/

--------------------------------------------------------------------------------

Join CEO Alfred Chuang and CTO Mark Carges on June 15 for a unique online 
event, giving you the first look at a new category of enterprise software 
built specifically for Service-Oriented Architecture (SOA).

Register Now.  It's Free!

http://www.bea.com/events/june15

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to