Hi All,
I'm having trouble accessing xml data through a typed dataset.. I've
brought the xsd info at the bottom of this message into vs 2005 and it
automatically created a typed set for me named friends. I have the xml:
<?xml version="1.0" ?>
<friends>
<friend>
<name> Ted </owner>
<description>
<age> 21 </age>
<height> 6 </height>
</description>
</friend>
</friends>
And I use the follow code to read it...
friends fr=new friends();
friends.readxml([xml above]);
I am able to access the first friend fine as follows..
string name=fr.friend[0].name;
but I can't figure out how to access the description subtable
which should be available at:
fr.friend[0].description
but is not... Can someone tell me what I am doing wrong? How do I get a
correct typed dataset?
Thanks in advance!
Eric
================================================== ===========
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="friends">
<xs:complexType>
<xs:sequence>
<xs:element name="friend">
<xs:complexType>
<xs:sequence>
<xs:element name="description">
<xs:complexType>
<xs:sequence>
<xs:element name="age" type="xs:int" />
<xs:element name="height" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>