code: @Override
     public String encode() {
         ReadableByteArrayOutputStream out = new ReadableByteArrayOutputStream();
         encode(out);
         return out.toString();
     }
docs: Simple encoding method that returns the text-encoded version of
  this attribute with no formatting.
  
  @return the text-encoded XML