2.3.3 Array Record (0x03)
This structure represents a series of repeating elements.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Element (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
End Element |
Record Type |
Length (variable) |
|||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
Data (variable) |
|||||||||||||||||||||||||||||||
... |
Element (variable): An Element record.
End Element (1 byte): An EndElement record.
Record Type (1 byte): The record type of the element content. This MUST be one of the values in the following table.
Length (variable): The number of elements, encoded with MultiByteInt31. This MUST not be zero.
Data (variable): The values for the elements, encoded according to RecordType.
-
The size of Data is the Length multiplied by the size of the RecordType according to the following table.
-
RecordType
Record
DataSize
0xB5
BoolTextWithEndElement
1
0x8B
Int16TextWithEndElement
2
0x8D
Int32TextWithEndElement
4
0x8F
Int64TextWithEndElement
8
0x91
FloatTextWithEndElement
4
0x93
DoubleTextWithEndElement
8
0x95
DecimalTextWithEndElement
16
0x97
DateTimeTextWithEndElement
8
0xAF
TimeSpanTextWithEndElement
8
0XB1
UuidTextWithEndElement
16
This record MUST be interpreted as the characters resulting from expanding this record into a series of records where the Element record is repeated for each value.
For example, if the Element and Attribute records expand to the following
-
<item xmlns='http://tempuri.org'>
and RecordType is Int32TextWithEndElement, and Length = 3, and Values = { 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00 }, this is interpreted as the following characters.
-
<item xmlns='http://tempuri.org'>1</item> <item xmlns='http://tempuri.org'>2</item> <item xmlns='http://tempuri.org'>3</item>
Since Length is 3 and the size of Int32TextWithEndElement is 4 according to the table, the size of Data is 12.. Values consist of 3 integer values, each encoded in 4 bytes as demanded by Int32TextWithEndElement. (As discussed in section 2.2.3.31, this MUST be interpreted as Int32Text followed by EndElement.)
Note that there is no carriage return or line feed included here, and the line break shown is for readability only.