Validating XML

When the server receives an ItemOperations, Search, or Sync command, it SHOULD check any of the XML elements specified in section 2.2.2 that are present in the command's XML body to ensure they comply with the requirements regarding data type, number of instances, order, and placement in the XML hierarchy. Unless specified in the following table, if an element does not meet the requirements specified for that element, the server SHOULD return protocol status error 2 for an ItemOperations command (as specified in [MS-ASCMD] section or a Search command (as specified in [MS-ASCMD] section, and protocol status error 6 for a Sync command (as specified in [MS-ASCMD] section

Element name


Protocol Status Error

BodyPreference (section

Child elements are not in the correct order.

4 (for Sync command)


Multiple BodyPreference elements are present with the same value in the Type child element

Server SHOULD return 4 (for Sync command), but MAY return an HTTP error 500.<1>

AllOrNone (section

The AllOrNone element is not of type boolean.

4 (for Sync command)


Multiple AllOrNone elements in a single BodyPreference element.

4 (for Sync command)