public void write( Object obj, OutputStream out ) throws Exception
{
BeanWriter beanWriter = new BeanWriter( out );
beanWriter.getXMLIntrospector().setRegistry( getRegistry() );
beanWriter.setWriteEmptyElements( true );
beanWriter.writeXmlDeclaration( XML_DECLARATION );
beanWriter.getBindingConfiguration().setMapIDs( false );
try
{
beanWriter.write( obj.getClass().getName(), obj );
}