I have to send binary data in XML and the standard way of doing that is using base64; however I have two options:
- store the binary into a xs:base64binary
- store the utf-8 encoded string representation of the base64 binary into a xs:string element
In the first case the schema reads:
<xs:element name="Image" type="xs:base64Binary" />
In the second case the schema reads:
<xs:element name="Image" type="xs:string" />
I suspect the first option is the more "correct", however it generates an XML that is bigger than the second option. The first element int the XML instance starts with "U1Vrc..." etc, the second one starts with "SUkqAAA.." etc.
Which one would be the most usual to see out there?