XML-binary Optimized Packaging

XML -binary Optimized Packaging ( XOP ) is a W3C recommendation for representing binary data in XML documents.

XOP replaces the usual for the representation of binary data in XML documents techniques such as use of CDATA blocks, Base64 encoding, SOAP with Attachments using MIME, and Microsoft's Direct Internet Message Encapsulation ( DIME ).


XOP XOP Infoset defines a, which acts as a container for the mixed binary -textual XML document. In this case, all binary data is separated from the XML document and by xop: include elements replaced. This xop: include elements reference the separated binary and replace again when deserializing the xop: include elements.

This technique is used by SOAP Message Transmission Optimization Mechanism (MTOM ).


XOP has the following advantages over other techniques of transmission of binary data:

  • When using CDATA blocks must be ensured that the binary data contained therein is not for CDATA blocks unwanted characters such as ASCII 0x00 to 0x08 or ] ] contain >.
  • Base64 encoding not only requires time and CPU resources, it generates data for a third require more space than the original binary data approximately.
  • In contrast to SOAP with Attachments or DIME existing XML technologies under XOP still work. This is especially true for the widely used technologies XQuery, XSLT, and XML Encryption.