tags:

views:

75

answers:

1

I have the following object XSD type. The Data element should actually be represented by a byte[] type, however, I am not sure how to model this in XSD. Could anyone help?

+4  A: 

It should be serialized as either base-64 (xsd:base64Binary][1]) or hex (xsd:hexBinary) types.

Most serialization toolkits have an API method to read or write bytes to that type. For example, in .net, you can use Convert.ToBase64String(buffer, 0, buffer.Length) to transform the array for XML.

lavinio