-1

Sorry if I make a duplicate or something but I'm not really good at English (so I don't really know what tags should I chose to find what I need) (and I don't find anything in French) and I'm looking for : how can I ask my program to check if there's an apple, or a pineapple, or both. But my XML needs to have at least one of them. I just started XML yesterday. Here's my code, can you tell me if this works or not, please ?

<xsd:element name = "fruits" minOccurs = "1" maxOccurs = "8">
<xsd:complexType>
    <xsd:choice>
        <xsd:element name = "apple" minOccurs = "1" maxOccurs = "4">
        </xsd:element>
        
        <xsd:element name = "pineapple" minOccurs = "1" maxOccurs = "unbounded"> 
        </xsd:element>
    </xsd:choice>
</xsd:complexType>

</xsd:element>

Thank you for your help !

Ken White
  • 123,280
  • 14
  • 225
  • 444
Laliana
  • 1
  • 2

1 Answers1

0

Your code basically looks correct, so I'm not sure what your problem is.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164