O'Reilly logo

Effective XML: 50 Specific Ways to Improve Your XML by Elliotte Rusty Harold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Base64

Base64 is an algorithm that is designed for encoding arbitrary sequences of bytes. Each group of three bytes (24 bits) is encoded as four characters taken from a subset of ASCII specifically designed to pass through various gateways and processors intact. The characters are the capital letters A–Z, the lowercase letters a–z, the digits 0–9, the plus sign (+), the forward slash (/), and the equals sign (=). None of these are likely to cause any problem for XML processors.

The downside to Base64 is that the data is completely opaque. Just because something is an ASCII character in input doesn't mean it's likely to be the same one in output. (In fact, that's almost guaranteed not to happen because Base64 encoding splits the bits of each byte ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required