Thanks, Jeremy for posting this. I will make sure that this will be added to the user docs (if it does not exist yet) soon, Can you please create an enhancement request at http://bugzilla.exolab.org, attach this sample ... and I'll take care of the rest.

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();

}

}
-----Original Message-----
From: janarthanankesavan [mailto:[EMAIL PROTECTED]
Sent: 09 July 2004 05:12
To: [EMAIL PROTECTED]
Subject: [castor-user] How to use the mapping tool?




Hi all,
I would like to know how to use this tool:
org.exolab.castor.tools.MappingTool.
It would be nice if someone provides a simple example of how to make use of this tool.
Reg
Janarthanan Kesavan



Life is not a bed of roses!
----------------------------
With warmest regards,
T.K.Janarthanan.




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

Reply via email to