Jeremy,

I have just added a new sample of how to use the MappingTool (based on below code) src/examples/MappingTool. Thanks for your input.

Werner


--Original Message Text---
From: Jeremy Nicholson
Date: Fri, 9 Jul 2004 09:42:46 +0100

import org.exolab.castor.tools.MappingTool;

import
java.io.*;

/**

* generate a Castor mapping file ready for editing

*/

public
class CastorMapper {

/**

* generate a Castor mapping file ready for editing

*/

public CastorMapper()

{

try

{

MappingTool tool = new MappingTool();

tool.addClass(DragQuestion.class);

tool.addClass(Group.class);

......

tool.addClass(User.class);

OutputStream file = new FileOutputStream("gen_mapping.xml" );

Writer writer = new OutputStreamWriter(file);



tool.write(writer);

}

catch (Exception ex)

{

ex.printStackTrace();

}



}

public static void main(String[] args)

{

new CastorMapper();

}

}


----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to