XML binary optimized packaging

from Wikipedia, the free encyclopedia

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

XOP thus replaces the techniques normally used to represent binary data in XML documents, such as the use of CDATA blocks, Base64 coding, SOAP with attachments using MIME , and Microsoft's Direct Internet Message Encapsulation (DIME).

technology

XOP defines an XOP Infoset , which acts as a container for the mixed binary-textual XML document. All binary data are separated from the XML document and replaced by xop: include elements. These xop: include elements reference the separated binary data and replace the xop: include elements again when deserializing.

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

example

<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:http://example.org/me.png"/>

properties

XOP offers the following advantages over other binary data transmission techniques:

  • When using CDATA blocks, it must be ensured that the binary data they contain do not contain characters such as ASCII 0x00 to 0x08 or characters that are not permitted for CDATA blocks ]]>.
  • Base64 encoding not only requires time and CPU resources, it also generates data that takes up about a third more space than the original binary data.
  • In contrast to SOAP with Attachments or DIME, existing XML technologies continue to work under XOP. This applies in particular to the widely used XQuery , XSLT and XML Encryption technologies .

literature

Web links

Individual evidence