2.2.5.2.6.4 Dictionaries

The Dictionaries container specifies an associative array; that is, a collection of keys and a collection of values in which every key is associated with one value.

XML Element: <DCT>

XML Contents: For each (key, value) pair, write <En>"key" "associated value"</En>, replacing "key" with results of serializing the key with name attribute (see section 2.2.5.3.1) set to "Key" and replacing "associated value" with results of serializing the associated value with name attribute (see section 2.2.5.3.1) set to "Value". Pairs can be processed and written in any order.

Example:

 <!-- serialization of a dictionary created with the following pseudo code:
   d = new dictionary();  d.add("key1", 1);  d.add("key2", 2);  -->
 <Obj RefId="RefId-0">
   <TN RefId="RefId-0">
     <T>System.Collections.Hashtable</T>
     <T>System.Object</T>
   </TN>
   <DCT>
     <En><S N="Key">key2</S><I32 N="Value">2</I32></En>
     <En><S N="Key">key1</S><I32 N="Value">1</I32></En>
   </DCT>
 </Obj>