Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Large data item block

Status
Not open for further replies.

StellaIndigo

IS-IT--Management
Sep 19, 2002
118
GB
I have a requirement where one data item will contain 1024 integer data types as one block of data, effectively an array of ints. There are 2 or more of these arrays in a document, so it's going to have 2 x 1024 integers.(These are scientific measurement values.)

What is the best way to structure the data in XML?

Like this
<Readings>
<DataBlock>
<Item>1234</Item> <!-- first item -->
<Item>7272</Item>
<Item>9293</Item>
..
<Item>7273</Item> <!-- 1024th item -->
</DataBlock>
<DataBlock>
<Item>1234</Item> <!-- first item -->
<Item>7272</Item>
<Item>9293</Item>
..
<Item>7273</Item> <!-- 1024th item -->
</DataBlock>
</Readings>

Or

<Readings>
<DataBlock>
<Items>1234;7837;9287;8267;2827;7983;8252;8373</Items>
..
<Items>1234;7837;9287;8267;2827;7983;8252;8373</Items>
</DataBlock>
<DataBlock>
<Items>1234;7837;9287;8267;2827;7983;8252;8373</Items>
..
<Items>1234;7837;9287;8267;2827;7983;8252;8373</Items>
</DataBlock>
</Readings>

Or is there a different way?

Thanks

Stella
 
Definately method 2 would be better from a readability/scalability point of view.

What it really comes down to is which is better for you and extensibility is what you should be asking. Imagine u had to come back to the file in 2 years time and update it and you'll soon make up your mind ;)


hope that helps.


matt

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top