title: How do you embed binary data in XML?
body: <p>I have two applications written in Java that communicate with each other using XML messages over the network.  I'm using a SAX parser at the receiving end to get the data back out of the messages.  One of the requirements is to embed binary data in an XML message, but SAX doesn't like this.  Does anyone know how to do this?</p>
  
  <p>UPDATE:  I got this working with the <a href="http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Base64.html" rel="noreferrer">Base64</a> class from the <a href="http://commons.apache.org/codec/" rel="noreferrer">apache commons codec library</a>, in case anyone else is trying something similar.</p>