The goal is to produce the following XML with JAXB
string data binary data >
string data binary data
Is there a reason you don't simply construct a String with your byte[]? Do you truly need a generic?