Hello,
I need some help with XML and dataset.
Take a look at this schema at the bottom of this email. If I load this in a
dataset, I get two tables, "mandatoryUsageUserIdList" and
"mandatoryUsageUserIdList2". Good.
If you see the type "ReplacementUserIdList", it has an element "userId"
with maxOccurs attribute of 2147483647.. However, the tables
"mandatoryUsageUserIdList" and "mandatoryUsageUserIdList2" simply contain
them as another column thereby making multiple rows impossible for "userId"..
I was actually expecting the "userId" to be another child table of both
"mandatoryUsageUserIdList" and "mandatoryUsageUserIdList2" tables in the
dataset.. Am I not right?.
Questions:
1) How should I adjust the schema in order for the "userId" to appear as
another table instead of a column?.
2) Is it possible in anyway to make the dataset read this as a "table"
without having to adjust the schema ?.
I really appreciate your help!
Thanks,
Ganesh
****************************
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
targetNamespace="http://tempuri.org"
xmlns:q3="http://tempuri.org/2001/XMLSchema" xmlns:q1="http://tempuri.org"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="BroadsoftDocument">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1"
name="mandatoryUsageUserIdList" type="q1:ReplacementUserIdList" />
<xs:element minOccurs="0" maxOccurs="1"
name="mandatoryUsageUserIdList2" type="q1:ReplacementUserIdList" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ReplacementUserIdList">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1"
name="dummy_column_ReplacementUserIdList" type="xs:string" />
<xs:element minOccurs="1" maxOccurs="2147483647" name="userId"
xmlns:q3="http://tempuri.org" type="q3:UserId" />
</xs:sequence>
</xs:complexType>
<xs:simpleType name="UserId">
<xs:restriction base="xs:string">
<xs:maxLength value="161" />
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
****************************