|
in the xml file, if the data is like this
<Project>
<A At1="1" At2="2" />
</Project>
To get At1, the format of data retrieving is
Project.A.Attributes.At1
and it can't be
Project.A{1,1}.Attributes.At1
If the xml is like
<Project>
<A ID="1" At1="1" At2="2" />
<A ID="2" At1="1" At2="3" />
</Project>
To get the At1, I need to have code like Project.A{1,1 or 2}.Attributes.At1.
So for data with undeterminant length for A, I will need to first determine the length of the data and use "if" to apply different retrieving code for data of different length, =1 or >1.
How can use uniform code, so that for data length=1, the code would be something like
Project.A{1,iData}.Attributes.At1. where iData == 1
and if data length >1, the code would be
Project.A{1,iData}.Attributes.At1. where iData could >1
Thanks...
|