code: public static String createFullBeanXmlString(Object object)
      {
          ByteArrayOutputStream stream = null;
          try
          {
              stream = new ByteArrayOutputStream();
              writeFullBeanXml(object, stream);
              return stream.toString();
          }
          finally
          {
              if (stream != null)
              {
                  try
                  {
                      stream.close();
                  }
                  catch (IOException e)
                  {
                      throw new XmlException("Could not close the stream", e);
                  }
              }
          }
      }
docs: Create the XML string describing the given bean, as created by
  an <code>XMLEncoder</code>, but including all properties, even
  if they still have their default values.
  
  @param object The bean object
  @return The string
  @throws XmlException If there is an error while encoding the object