Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:57:07+00:00 2026-06-02T15:57:07+00:00

As per xsd, the supported binary types are hexbinary and base64 encoded binary data.

  • 0

As per xsd, the supported binary types are hexbinary and base64 encoded binary data. http://www.w3schools.com/schema/schema_dtypes_misc.asp

My intention is to read raw byte contents from the memory and serialize it to the xml file. Hence, what data type above would describe the raw byte contents OR do i have to make sure that the raw byte contents are converted to hexdecimal to adhere to one of the 2 data types described above ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:57:10+00:00Added an answer on June 2, 2026 at 3:57 pm

    You need to encode the raw data to one of the two data types. This is to keep some random data from messing up the XML format, for example if you had a < embedded in the data somewhere.

    You can choose whichever of the two is most convenient for you. The hexadecimal type is easier to write code for but produces a larger file – the ratio of bytes out to bytes in is 2:1, where it is 4:3 for the Base64 encoding. You shouldn’t need to write your own code though, Base64 conversion functions are readily available. Here’s a question that has some code in the answers: How do I base64 encode (decode) in C?

    As an example of how the codings differ, here’s the phrase “The quick brown fox jumps over the lazy dog.” encoded both ways.

    Hex:

    54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f672e
    

    Base64:

    VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4=
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Per http://www.assembla.com/spaces/clojure/wiki/Datatypes I should be able to type the following into a lein reply:
In my schema I have some types that simply extend a simple XSD type
Per the docs , the default location is: src/main/resources. My XSD's are in src/main/schema,
I have used xsd.exe tool to generate data class but wcf doesn't like the
Per the examples https://getbootstrap.com/docs/4.3/content/code/#code-blocks , bootstrap only supports vertically-scrollable and word-wrapped <pre> blocks out
Per http://perldoc.perl.org/CGI.html to make meta tags, the following example is given: print start_html(-head=>meta({-http_equiv =>
I am using XmlReader to validate a XML file as per the supplied schema.
I have XML as below which I am loading into XDocument <ConversionSpecification xmlns=http://tempuri.org/X12ParserSpecification.xsd TransactionSetIdentifierCode=837>
Per a great answer from another question I have begun mounting global resources (css/js/images)
Per this question (see comments near the bottom), I was wondering if anyone knows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.