3 Structure Examples
The following table provides an example of almost every record type, and shows the character interpretations.
The record column shows each of the record types. The Type column shows the value of the record type, which is taken from Table 1. The Bytes column show a complete XML document encoded in this format that highlights the use of the record type. Because the record type is not always first, its location in the sequence of bytes is highlighted. The Chars column shows the same data from the Bytes column, formatted as characters. The final column, Characters represented, shows the XML interpretation of the bytes.
Note Records that refer to strings outside the document are shown as "strXXX" where XXX is the integer value.
Record |
Type (hex) |
Bytes (hex) |
Chars |
Characters represented |
---|---|---|---|---|
EndElement |
01 |
40 03 64 6F 63 01 |
@.doc. |
<doc></doc> |
Comment |
02 |
02 07 63 6F 6D 6D 65 6E 74 |
..comment |
<!--comment--> |
Array |
03 |
03 40 03 61 72 72 01 8B 03 33 33 88 88 DD DD |
.@.arr... 33..YY |
<arr>13107</arr> <arr>-30584</arr> <arr>-8739</arr> |
ShortAttribute |
04 |
40 03 64 6F 63 04 04 61 74 74 72 84 01 |
@.doc..attr.. |
<doc attr="false"> </doc> |
Attribute |
05 |
40 03 64 6F 63 09 03 70 72 65 0A 68 74 74 70 3A 2F 2F 61 62 63 05 03 70 72 65 04 61 74 74 72 84 01 |
@.doc..pre.http://abc..pre. attr.. |
<doc xmlns: pre="http://abc " pre:attr="false"> </doc> |
ShortDictionary Attribute |
06 |
40 03 64 6F 63 06 08 86 01 |
@.doc.... |
<doc str8="true"> </doc> |
DictionaryAttribute |
07 |
40 03 64 6F 63 09 03 70 72 65 0A 68 74 74 70 3A 2F 2F 61 62 63 07 03 70 72 65 00 86 01 |
@.doc..pre.http://abc.. pre... |
<doc xmlns:pre= "http://abc" p re:str0="true"> </doc> |
ShortXmlnsAttribute |
08 |
40 03 64 6F 63 08 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
@.doc..http://abc. |
<doc xmlns="http: //abc"> </doc> |
XmlnsAttribute |
09 |
40 03 64 6F 63 09 01 70 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
@.doc..p.http://abc. |
<doc xmlns:p="http: //abc"> </doc> |
ShortDictionaryXmlns Attribute |
0A |
40 03 64 6F 63 0A 04 01 |
@.doc... |
<doc xmlns="str4"> </doc> |
DictionaryXmlns Attribute |
0B |
40 03 64 6F 63 0B 01 70 04 01 |
@.doc..p.. |
<doc xmlns:p="str4"> </doc> |
PrefixDictionary AttributeF |
11 |
40 03 64 6F 63 09 01 66 0A 68 74 74 70 3A 2F 2F 61 62 63 11 0B 98 05 68 65 6C 6C 6F 01 |
@.doc..f. http://abc ....hello. |
<doc xmlns:f="http: //abc" f:str11="hello"> </doc> |
PrefixDictionary AttributeX |
23 |
40 03 64 6F 63 09 01 78 0A 68 74 74 70 3A 2F 2F 61 62 63 23 15 98 05 77 6F 72 6C 64 01 |
@.doc..x .http://abc# ...world. |
<doc xmlns:x="http://abc " x:str21="world"></doc> |
PrefixAttributeK |
30 |
40 03 64 6F 63 09 01 6B 0A 68 74 74 70 3A 2F 2F 61 62 63 30 04 61 74 74 72 86 01 |
@.doc.. k.http:// abc0.attr.. |
<doc xmlns:k= "http://abc" k:attr="true"></doc> |
PrefixAttributeZ |
3F |
40 03 64 6F 63 09 01 7A 0A 68 74 74 70 3A 2F 2F 61 62 63 3F 03 61 62 63 98 03 78 79 7A 01 |
@.doc..z .http://abc? .abc..xyz. |
<doc xmlns:z= "http://abc" z:abc= "xyz"> </doc> |
ShortElement |
40 |
40 03 64 6F 63 01 |
@.doc. |
<doc></doc> |
Element |
41 |
41 03 70 72 65 03 64 6F 63 09 03 70 72 65 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
A.pre.doc ..pre.http: //abc. |
<pre:doc xmlns:pre= "http://abc"> </pre:doc> |
ShortDictionary Element |
42 |
42 0E 01 |
B.. |
<str14></str14> |
DictionaryElement |
43 |
43 03 70 72 65 0E 09 03 70 72 65 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
C.pre...pre. http://abc. |
<pre:str14 xml ns:pre="http: //abc"></pre:str14> |
PrefixDictionary ElementA |
44 |
44 0A 09 01 61 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
D...a.http:// abc. |
<a:str10 xmlns:a= "http://abc"> </a:str10> |
PrefixDictionary ElementS |
56 |
56 26 09 01 73 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
V&..s.http: //abc. |
<s:str38 xmlns:s= "http://abc"> </s:str38> |
PrefixElementA |
5E |
5E 05 68 65 6C 6C 6F 09 01 61 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
^.hello..a. http://abc. |
<a:hello xmlns:a= "http://abc"> </a:hello> |
PrefixElementS |
70 |
70 09 4D 79 4D 65 73 73 61 67 65 09 01 73 0A 68 74 74 70 3A 2F 2F 61 62 63 01 |
p.MyMessage.. s.http://abc. |
<s:MyMessage xmlns:s= "http://abc"> </s:MyMessage> |
ZeroText |
80 |
40 03 64 6F 63 06 A0 03 80 01 |
@.doc.ÿ... |
<doc str416="0"> </doc> |
ZeroTextWithEnd Element |
81 |
40 03 61 62 63 81 |
@.abc. |
<abc>0</abc> |
OneText |
82 |
40 03 64 6F 63 06 00 82 01 |
@.doc.... |
<doc str0="1"> </doc> |
OneTextWithEnd Element |
83 |
40 03 61 62 63 83 |
@.abc. |
<abc>1</abc> |
FalseText |
84 |
40 03 64 6F 63 06 00 84 01 |
@.doc.... |
<doc str0="false"> </doc> |
FalseTextWithEnd Element |
85 |
40 03 61 62 63 85 |
@.abc. |
<abc>false</abc> |
TrueText |
86 |
40 03 64 6F 63 06 00 86 01 |
@.doc.... |
<doc str0="true"> </doc> |
TrueTextWithEnd Element |
87 |
40 03 61 62 63 87 |
@.abc. |
<abc>true</abc> |
Int8Text |
88 |
40 03 64 6F 63 06 EC 01 88 DE 01 |
@.doc.□.._. |
<doc str236="-34"> </doc> |
Int8TextWithEnd Element |
89 |
42 9A 01 89 7F |
B.... |
<str154>127</str154> |
Int16Text |
8A |
40 03 64 6F 63 06 EC 01 8A 00 80 01 |
@.doc.□..... |
<doc str236="-32768"> </doc> |
Int16TextWithEnd Element |
8B |
42 9A 01 8B FF 7F |
B...˜. |
<str154>32767</str154> |
Int32Text |
8C |
40 03 64 6F 63 06 EC 01 8C 15 CD 5B 07 01 |
@.doc.□...I[.. |
<doc str236="123456789"> </doc> |
Int32TextWithEnd Element |
8D |
42 9A 01 8D FF FF FF 7F |
B...˜˜˜. |
<str154>2147483647 </str154> |
Int64Text |
8E |
40 03 64 6F 63 06 EC 01 8E 00 00 00 80 00 00 00 00 01 |
@.doc.□........... |
<doc str236="2147483648"> </doc> |
Int64TextWithEnd Element |
8F |
42 9A 01 8F 00 00 00 00 00 01 00 00 |
B........... |
<str154>1099511627776 </str154> |
FloatText |
90 |
40 03 64 6F 63 04 01 61 90 CD CC 8C 3F 01 |
@.doc..a.II.?. |
<doc a="1.1"></doc> |
FloatTextWithEnd Element |
91 |
40 05 50 72 69 63 65 91 CD CC 01 42 |
@.Price.II.B |
<Price>32.45</Price> |
DoubleText |
92 |
40 03 64 6F 63 04 01 61 92 74 57 14 8B 0A BF 05 40 01 |
@.doc..a.tW...¨.@. |
<doc a="2.71828182845905"> </doc> |
DoubleTextWithEnd Element |
93 |
40 02 50 49 93 11 2D 44 54 FB 21 09 40 |
@.PI..-DT–!.@ |
<PI>3.14159265358979 </PI> |
DecimalText |
94 |
40 03 64 6F 63 04 03 69 6E 74 94 00 00 06 00 00 00 00 00 80 2D 4E 00 00 00 00 00 01 |
@.doc..int..... .....-N ...... |
<doc int="5.123456"> </doc> |
DecimalTextWithEnd Element |
95 |
40 08 4D 61 78 56 61 6C 75 65 95 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF |
@.MaxValue .....˜˜˜˜˜˜˜˜ ˜˜˜˜ |
<MaxValue> 792281625142643375 93543950335 </MaxValue> |
DateTimeText |
96 |
40 03 64 6F 63 06 6E 96 FF 3F 37 F4 75 28 CA 2B 01 |
@.doc.n."?7" u(E+. |
<doc str110= "9999-12-31T23:59:59.9999999"> </doc> |
DateTimeTextWithEnd Element |
97 |
42 6C 97 00 40 8E F9 5B 47 C8 08 |
Bl..@.—[GE. |
<str108> 2006-05-17T00:00:00 </str108> |
Chars8Text |
98 |
40 03 64 6F 63 98 05 68 65 6C 6C 6F 01 |
@.doc..hello. |
<doc>hello</doc> |
Chars8TextWithEnd Element |
99 |
40 01 61 99 05 68 65 6C 6C 6F |
@.a..hello |
<a>hello</a> |
Chars16Text |
9A |
40 03 64 6F 63 9A 05 00 68 65 6C 6C 6F 01 |
@.doc...hello. |
<doc>hello</doc> |
Chars16TextWithEnd Element |
9B |
40 01 61 9B 05 00 68 65 6C 6C 6F |
@.a...hello |
<a>hello</a> |
Chars32Text |
9C |
40 03 64 6F 63 9C 05 00 00 00 68 65 6C 6C 6F 01 |
@.doc.....hello. |
<doc>hello</doc> |
Chars32TextWithEnd Element |
9D |
40 01 61 9D 05 00 00 00 68 65 6C 6C 6F |
@.a.....hello |
<a>hello</a> |
Bytes8Text |
9E |
40 03 64 6F 63 9E 08 00 01 02 03 04 05 06 07 01 |
@.doc........... |
<doc>AAECAwQFBgc= </doc> |
Bytes8TextWithEnd Element |
9F |
40 06 42 61 73 65 36 34 9F 08 00 01 02 03 04 05 06 07 |
@.Base64 .......... |
<Base64>AAECAwQFBgc= </Base64> |
Bytes16Text |
A0 |
40 03 64 6F 63 A0 08 00 00 01 02 03 04 05 06 07 01 |
@.docÿ ........... |
<doc>AAECAwQFBgc= </doc> |
Bytes16TextWithEnd Element |
A1 |
40 06 42 61 73 65 36 34 A1 08 00 00 01 02 03 04 05 06 07 |
@.Base64 .......... |
<Base64>AAECAwQFBgc= </Base64> |
Bytes32Text |
A2 |
40 03 64 6F 63 A2 08 00 00 00 00 01 02 03 04 05 06 07 01 |
@.doc› ............. |
<doc>AAECAwQFBgc= </doc> |
Bytes32TextWithEnd Element |
A3 |
40 06 42 61 73 65 36 34 A3 08 00 00 00 00 01 02 03 04 05 06 07 |
@.Base64œ ............ |
<Base64>AAECAwQFBgc= </Base64> |
StartListText |
A4 |
40 03 64 6F 63 04 01 61 A4 88 7B 98 05 68 65 6C 6C 6F 86 A6 01 |
@.doc..a.{.. hello.Ý. |
<doc a="123 hello true"> </doc> |
EndListText |
A6 |
40 03 64 6F 63 04 01 61 A4 88 7B 98 05 68 65 6C 6C 6F 86 A6 01 |
@.doc..a.{.. hello.Ý. |
<doc a="123 hello true"> </doc> |
EmptyText |
A8 |
40 03 64 6F 63 04 01 61 A8 01 |
@.doc..a". |
<doc a=""></doc> |
EmptyTextWithEnd Element |
A9 |
40 03 64 6F 63 A9 |
@.docc |
<doc></doc> |
DictionaryText |
AA |
40 03 64 6F 63 04 02 6E 73 AA 38 01 |
@.doc..ns¦8. |
<doc ns="str56"> </doc> |
DictionaryTextWithEnd Element |
AB |
40 04 54 79 70 65 AB C4 01 |
@.Type®Ž. |
<Type>str196</Type> |
UniqueIdText |
AC |
40 03 64 6F 63 AC 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 01 |
@.docª.."3DU fw..¦¯IYŒ˜. |
<doc>urn:uuid: 33221100-5544- 7766-8899- aabbccddeeff </doc> |
UniqueIdTextWithEnd Element |
AD |
42 1A AD 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF |
B.-.."3DUfw..¦¯IYŒ˜ |
<str26>urn:uuid: 33221100-5544- 7766-8899- aabbccddeeff </str26> |
TimeSpanText |
AE |
40 03 64 6F 63 AE 00 C4 F5 32 FF FF FF FF 01 |
@.docr.Žo2˜˜˜˜. |
<doc>-PT5M44S</doc> |
TimeSpanTextWithEnd Element |
AF |
42 94 07 AF 00 B0 8E F0 1B 00 00 00 |
B.._.ø.d.... |
<str916>PT3H20M </str916> |
UuidText |
B0 |
40 03 64 6F 63 B0 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 01 |
@.docø.... ............. |
<doc>03020100- 0504-0706-0809- 0a0b0c0d0e0f</doc> |
UuidTextWithEnd Element |
B1 |
40 02 49 44 B1 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F |
@.IDñ...... .......... |
<ID>03020100- 0504-0706-0809- 0a0b0c0d0e0f </ID> |
UInt64Text |
B2 |
40 03 64 6F 63 B2 FF FF FF FF FF FF FF FF 01 |
@.docý˜˜˜˜˜˜˜˜. |
<doc>18446744 073709551615 </doc> |
UInt64TextWithEnd Element |
B3 |
42 9A 01 B3 FE FF FF FF FF FF FF FF |
B..3_˜˜˜˜˜˜˜ |
<str154>18446744 073709551614 </str154> |
BoolText |
B4 |
40 03 64 6F 63 B4 01 01 |
@.doc'.. |
<doc>true</doc> |
BoolTextWithEnd Element |
B5 |
03 40 03 61 72 72 01 B5 05 01 00 01 00 01 |
.@.arr.æ...... |
<arr>true</arr> <arr>false</arr> <arr>true</arr> <arr>false</arr> <arr>true</arr> |
UnicodeChars8Text |
B6 |
40 03 64 6F 63 04 01 75 B6 06 75 00 6E 00 69 00 01 |
@.doc..u.u.n.i.. |
<doc u="uni"></doc> |
UnicodeChars8Text WithEndElement |
B7 |
40 01 55 B7 06 75 00 6E 00 69 00 |
@.Uú.u.n.i. |
<U>uni</U> |
UnicodeChars16Text |
B8 |
40 03 64 6F 63 04 03 75 31 36 B8 08 00 75 00 6E 00 69 00 32 00 01 |
@.doc..u16,..u.n.i.2.. |
<doc u16="uni2"> </doc> |
UnicodeChars16Text WithEndElement |
B9 |
40 03 55 31 36 B9 08 00 75 00 6E 00 69 00 32 00 |
@.U161..u.n.i.2. |
<U16>uni2</U16> |
UnicodeChars32Text |
BA |
40 03 64 6F 63 04 03 75 33 32 BA 04 00 00 00 33 00 32 00 01 |
@.doc..u32§....3.2.. |
<doc u32="32"> </doc> |
UnicodeChars32Text WithEndElement |
BB |
40 03 55 33 32 BB 04 00 00 00 33 00 32 00 |
@.U32¯....3.2. |
<U32>32</U32> |
QNameDictionaryText |
BC |
40 03 64 6F 63 06 F0 06 BC 08 8E 07 01 |
@.doc.d.¬.... |
<doc str880="i: str910"></doc> |
QNameDictionaryText WithEndElement |
BD |
40 04 54 79 70 65 BD 12 90 07 |
@.Type«... |
<Type>s:str912 </Type> |
As described in section 2, the document is represented by the concatenation of the characters represented by the records. No additional characters can be inserted.
For example, if the document consists of the records
-
ShortElement(name="element", attributes={}) Int32Text(value=1234) FalseText EndElement
then the characters represented by these records are interpreted as the following.
-
<element>1234false</element>