I was just surprised that i had a function to test my attributes and not my 
elements, because for both i didn't define if there were optional or not. 
 
Thanks for your help



From: [email protected]: [email protected]: RE: 
Testing the element's existenceDate: Thu, 11 Dec 2008 12:12:39 -0800


This is because your element in this example is not optional, the way I was 
defining "optional" in my previous post.
 
Radu



From: Ben roche [mailto:[email protected]] Sent: Wednesday, December 10, 
2008 3:43 PMTo: [email protected]: RE: Testing the element's 
existence
I don't have any method sizeOf/isSet generated for my elements ... Here is an 
example of my xsd    <xs:element name="XML">        <xs:complexType>          
<xs:sequence>              <xs:element ref="Example"/>          </xs:sequence>  
        <xs:attribute name="a" type="xs:string"/>          <xs:attribute 
name="b" type="xs:string"/>        </xs:complexType>    </xs:element>    
<xs:element name="Example">        <xs:complexType>          <xs:sequence>      
        <xs:element ref="first"/>              <xs:element ref="second"/>       
       <xs:element ref="third" maxOccurs="2"/>          </xs:sequence>          
<xs:attribute name="data" type="xs:string"/>        </xs:complexType>    
</xs:element>i don't have the generated method isSet for the element "Example", 
just have the getExample() method 

From: [email protected]: [email protected]: RE: 
Testing the element's existenceDate: Tue, 9 Dec 2008 20:30:39 -0500


The answer is that the isSetXXX() methods are being generated for "optional" 
elements/attributes, where by "optional" we mean they can appear 0 or 1 times. 
For arrays (elements that can appear more than 1 time), you can call 
sizeOfXXX(), that would be the equivalent method.
 
Radu



From: Ben roche [mailto:[email protected]] Sent: Tuesday, December 09, 2008 
12:24 PMTo: [email protected]: Testing the element's existence
Hi, I'm new in the use of XMLBeans, and I have one question:How can you test 
the existence of an element ? I see there is an isSetAttribute() for each 
attribute, but I don't the see an equivalent method for the element... Did you 
do a getElementArray() and test if the array is empty ? I just feel it strange 
that there is no testing method for element... Thank you for you help, i know 
that my question is a little bit stupid but I didn't find any answers on the 
XMLBeans website. Regards

Qui vous permet d'enregistrer la TV sur votre PC et lire vos emails sur votre 
mobile ? la réponse en vidéo la réponse en vidéo 

Qui vous permet d'enregistrer la TV sur votre PC et lire vos emails sur votre 
mobile ? la réponse en vidéo la réponse en vidéo 
_________________________________________________________________
Email envoyé avec Windows Live Hotmail. Dites adieux aux spam et virus, passez 
à Hotmail ! C'est gratuit !
http://www.windowslive.fr/hotmail/default.asp

Reply via email to