tektipster79
Programmer
I need to store hashtables that hold index information into collections of items stored in classes representing an XML document (generated by a tool similar to xsd.exe). For instance, suppose I have the following XML structure (please excuse my lame example):
So in order to navigate to a sock collection, I need the index of the drawer and the sock organizer.
Would it be better for me to create some sort of custom collection that has a drawer and sock organizer property and then a hashtable holding the index of the socks, or would it be ok (performant) to use a multi dimensional array?
Code:
<Dresser>
<Drawer>
<SockOrganizer>
<Compartment>
<sock color=red></sock>
<sock color=blue></sock>
</Compartment>
<Compartment>
<sock color=red></sock>
<sock color=blue></sock>
<sock color=white></sock>
<sock color=black></sock>
</Compartment>
</SockOrganizer>
</Drawer>
<Drawer>
<SockOrganizer>
<sock color=red></sock>
</SockOrganizer>
<SockOrganizer>
<sock color=red></sock>
<sock color=purple></sock>
</SockOrganizer>
</Drawer>
</Dresser>
So in order to navigate to a sock collection, I need the index of the drawer and the sock organizer.
Would it be better for me to create some sort of custom collection that has a drawer and sock organizer property and then a hashtable holding the index of the socks, or would it be ok (performant) to use a multi dimensional array?