|
-
May 5th, 2006, 02:04 AM
#1
Array in XML
Hi,
I want to create a typed dataset to keep my data model in a c# application. The data shall be stored in a XML file like this:
Code:
<data>
<item1 attr="1">
<item2>1</item2>
<item2>2</item2>
<item2>3</item2>
<item2>4</item2>
</item1>
<item1 attr="2">
<item2>5</item2>
<item2>6</item2>
<item2>7</item2>
<item2>8</item2>
</item1>
</data>
After having created a scheme with xsd I expected to access the members of the dataset as stated below:
Code:
test = ds.item1[1].item2[3];
However xsd does not build item2 as a child of item1. Instead my expectation item2 is accessible by
Code:
test = ds.item2[7];
Hence, there is no information about item1 (e.g. attribute, other elements, etc.) linked to item2.
Is there anyone who knows how to create an array member that is in scope of another array?
Thanks in advance,
gbr
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|