I have an XML schema that includes data types that use <xs:union>and <xs:list>. Here is an excerpt:
<xs:simpleType name="mixeduniontype">
<xs:union memberTypes="xs:boolean xs:int xs:double xs:string"/>
</xs:simpleType>
<xs:simpleType name="valuelist">
<xs:list itemType="xs:double"/>
</xs:simpleType>
And here is a sample XML fragment:
<value>42</value>
<value>hello</value>
<values>1 2 3.2 5.6</values>
The top two <value>are joins, and the bottom <values>is a list.
My question is how I analyze the elements <xs:union>and <xs:list>in .NET?
How to check which data type matters in a join element?
How to extract items in a list item and convert them to a C # list?
Is there any built-in support in System.XML for this kind of parsing, or do I need to write the parsing code myself?