You won't be able to get to the attribute definition from the sequence since
attributes are contained in complexTypes. From a complexType you can easily
get more details. I posted a more complete example that should help get you
"Suresh" <sureshpasala@hotmail.com> wrote in message
news:062e01c36775$964eb140$a401280a@phx.gbl...
> Hello All,
> I have a schema ( XSD) as follows.
> - <xs:complexType name="Tzp3wsXSPOP3MessageArray">
> - <xs:complexContent>
> - <xs:restriction base="soapenc:Array">
> <xs:sequence />
> <xs:attribute ref="soapenc:arrayType"
> n1:arrayType="ns1:Tzp3wsXSPOP3Message[]"
> xmlns:n1="
http://schemas.xmlsoap.org/wsdl/" />
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
> - <xs:complexType name="Tzp3wsXSPOP3Message">
> - <xs:sequence>
> <xs:element name="Body" type="xs:string" />
> <xs:element name="Date" type="xs:dateTime" />
> <xs:element name="From" type="xs:string" />
> <xs:element name="Size" type="xs:int" />
> <xs:element name="Subject" type="xs:string" />
> <xs:element name="UID" type="xs:string" />
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
>
> I get the complextype name as Tzp3wsXSPOP3MessageArray,
> now I need to go to the attribute ref element annd get the
> array type as "Tzp3wsXSPOP3Message[]".
> The problem is how do I get to <xs:attribute ref> element
> since I dont find any property in XmlSchemaSequence class
> that gets me there. The "items" property is null in the
> above given case.Am I missing anything?
> Once i get the array I need to go to that particular type
> i.e "Tzp3wsXSPOP3Message" and expand it.
> The above schema is a part of a WSDL file.
> Iam using C# on .NET.
>
> Thanks for your time.
> Regards
> Suresh