简体   繁体   中英

How to write Byte[] in XML in XSD?

JSON response is of Filename , Content:

{
  “Filename” : “abc.pdf”
  “Content” : “abejmkkjshkduhjkskwbkjejjkhugaib” 
}

where

Filename : String 
Content : Byte[]

How to write Byte[] in my XSD schema ?

You cannot directly store raw bytes in XML files, but you can encode them in Base64 and store the encoding. For Base64-encoded data, use base64Binary in XSD.

Be sure that your data is actually Base64, because xs:base64 is not the same as xs:string .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM