Chapter 18 Travailler avec XML


Choix et tout (Choice & All)

Un choix (choice) permet d'afficher uniquement un enfant dans une instance d'un élément.

Tout (All) permet d'afficher tous les éléments à la fois dans le groupe, ou aucun.

Dans PowerAMC, vous concevez un choix/tout presque comme une séquence.

<xsd:element name="InternationalShipping">
 <xsd:choice>
  <xsd:element name="EuropeShipping" type="int"/>
  <xsd:element name="AfricaShipping" type="int"/>
  <xsd:element name="AsiaShipping" type="int"/>
 </xsd:choice>
</xsd:element>

 


Copyright (C) 2006. Sybase Inc. All rights reserved.