2.2.5 XML Document (XML_DOCUMENT)

This sub-packet represents an XML document that is being sent inside another packet (for more information, see [MSFT-XMLPAPER]). The XML document is a single character string. The exact size of the document is specified by the cbXMLSize field; a protocol parser MUST use the value in the cbXMLSize field for the string length and MUST NOT use null-termination of the XMLDocument string to determine the size.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

cbXMLSize

XMLDocument (variable)

...

cbXMLSize (4 bytes): A 32-bit unsigned integer. This field MUST contain the number of bytes in the following XMLDocument field.

XMLDocument (variable): An array of 8-bit unsigned integers. This field contains the serialized XML document. The contents are treated as opaque by this protocol.