Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > use xml to describe java class

Reply
Thread Tools

use xml to describe java class

 
 
f
Guest
Posts: n/a
 
      11-26-2003
I am writing a java code generation tool. The tool will take a java
class description written in xml and translate it to java code using
xslt. I am looking for samples of xml files that describe java class.
Any help appreciated.

ff
 
Reply With Quote
 
 
 
 
Michael Schwind
Guest
Posts: n/a
 
      11-26-2003
Hi,

I've successfully used the Eclipse Modelling Framework for this.
You may want to have a look at this:

http://www.eclipse.org/emf/
http://www.omg.org/technology/documents/formal/xmi.htm

HTH, Michael


"f" <(E-Mail Removed)> schrieb im Newsbeitrag news:(E-Mail Removed) om...
> I am writing a java code generation tool. The tool will take a java
> class description written in xml and translate it to java code using
> xslt. I am looking for samples of xml files that describe java class.
> Any help appreciated.
>
> ff

 
Reply With Quote
 
 
 
 
Florian Deissenboeck
Guest
Posts: n/a
 
      11-27-2003
Take a look at JavaML at http://www.cs.washington.edu/homes/gjb/JavaML/

Flo


"f" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed) om...
> I am writing a java code generation tool. The tool will take a java
> class description written in xml and translate it to java code using
> xslt. I am looking for samples of xml files that describe java class.
> Any help appreciated.
>
> ff



 
Reply With Quote
 
GIMME
Guest
Posts: n/a
 
      12-01-2003
Why can't you use java 1.4's built in code which works on java beans ...

import java.io.*;
import java.beans.*;

public class ENXML
{

public static void encode( String FileName , A a )
throws FileNotFoundException
{
XMLEncoder encoder = new XMLEncoder(
new BufferedOutputStream(
new FileOutputStream( FileName )));

encoder.writeObject( a );
encoder.close();
}

public static A decode( String FileName )
throws FileNotFoundException
{
XMLDecoder decoder = new XMLDecoder(
new BufferedInputStream(
new FileInputStream( FileName )));

A a = (A)decoder.readObject();
decoder.close();
return a;
}

}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to describe a pipeline structure in VHDL Ingmar Seifert VHDL 10 11-04-2009 07:25 AM
xml standard to describe database table schema Manuel XML 0 09-28-2005 10:43 PM
PSL stmts in VHDL: how to describe asynchronous dependencies? Eric DELAGE VHDL 2 04-06-2005 05:15 AM
[Eclipse] Help to describe or solve a M 3.0 bug Cram TeXeD Java 0 06-12-2004 08:59 PM
use xml to describe java class f XML 4 12-01-2003 05:35 PM



Advertisments