[xsd-users] A Question about elements sequence

lvkun lvkun2006 at gmail.com
Sun Aug 10 23:36:39 EDT 2008


The example xsd file is:
<xs:element   name= "book">
      <xs:complexType>
            <xs:sequence >
                    <xs:element   name= "title"   type= "xs:string"/>
                    <xs:element   name = "author"  type= "xs:string"
minOccurs= "1"   maxOccurs= "unbounded"/>
            </xs:sequence>
      </xs:complexType>
</xs:element>
But when I parse the xml file, the element sequence is not fixed. Maybe like
this:
<book>
	<author>
	A
	</author>
	<author>
	B
	</author>
	<title>
	AAAA
	</title>
</book>
So, when I use xsd to parse this file, it throw exception. How to solve this
problem? Thanks a lot.





More information about the xsd-users mailing list