B
Big D
I am having trouble understanding strongly typed datasets and XML files. I
have the following schema:
<xs:schema id="Pages" targetNamespace="http://asdf.org/EOBEPages.xsd"
elementFormDefault="qualified"
xmlns="http://asdf.org" xmlns:mstns="http://asdf.org/EOBEPages.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EOBEPages">
<xs:complexType>
<xs:sequence>
<xs:element name="Page">
<xs:complexType>
<xs:sequence>
<xs:element name="PageTitle" type="xs:string" />
<xs:element name="PageText" type="xs:string" />
<xs:element name="PageNumber" type="xs:integer" />
<xs:element name="NumImages" type="xs:integer" />
<xs:element name="ImagesDescription" type="xs:string" minOccurs="0"
maxOccurs="1" />
<xs:element name="ImageDefinitions">
<xs:complexType>
<xs:sequence>
<xs:element name="Description" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I load the xml data into the dataset no problem, and can access the "page"
info by:
myDataset.Page(index).pageTitle
, etc, but can NOT access the "ImageDefinitions", because I guess I don't
understand how. What I wanted to do is something like:
myVar = myDataset.Page(index).ImageDefinitions(index2).Description
but this is not part of the dataset... why? How can I get access to the
image definition descriptions based on the page index?
Thanks a bunch!
MC D
have the following schema:
<xs:schema id="Pages" targetNamespace="http://asdf.org/EOBEPages.xsd"
elementFormDefault="qualified"
xmlns="http://asdf.org" xmlns:mstns="http://asdf.org/EOBEPages.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="EOBEPages">
<xs:complexType>
<xs:sequence>
<xs:element name="Page">
<xs:complexType>
<xs:sequence>
<xs:element name="PageTitle" type="xs:string" />
<xs:element name="PageText" type="xs:string" />
<xs:element name="PageNumber" type="xs:integer" />
<xs:element name="NumImages" type="xs:integer" />
<xs:element name="ImagesDescription" type="xs:string" minOccurs="0"
maxOccurs="1" />
<xs:element name="ImageDefinitions">
<xs:complexType>
<xs:sequence>
<xs:element name="Description" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I load the xml data into the dataset no problem, and can access the "page"
info by:
myDataset.Page(index).pageTitle
, etc, but can NOT access the "ImageDefinitions", because I guess I don't
understand how. What I wanted to do is something like:
myVar = myDataset.Page(index).ImageDefinitions(index2).Description
but this is not part of the dataset... why? How can I get access to the
image definition descriptions based on the page index?
Thanks a bunch!
MC D