473,320 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

use xml to describe java class

f
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
Jul 20 '05 #1
4 2127
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" <ff****@yahoo.com> schrieb im Newsbeitrag news:8f**************************@posting.google.c 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

Jul 20 '05 #2
Take a look at JavaML at http://www.cs.washington.edu/homes/gjb/JavaML/

Flo
"f" <ff****@yahoo.com> schrieb im Newsbeitrag
news:8f**************************@posting.google.c 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

Jul 20 '05 #3
On Thu, 27 Nov 2003 09:27:11 +0100, "Florian Deissenboeck"
<fl*@deissenboeck.de> wrote:
Take a look at JavaML at http://www.cs.washington.edu/homes/gjb/JavaML/


Cool. That has java-to-xml and xml-to-java (and xml-to-html). How
about pascal-to-xml, xml-to-pascal. Etc.
Then we just need a decent xml-editor and some version control system
to get things really rolling.

Has anyone done any work on pascal-to-xml?
-Timo
Jul 20 '05 #4
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;
}

}
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Lem | last post by:
I get the error Exception in thread "main" java.lang.NoClassDefFoundError when I type java app2 in the command prompt. I've tried moving to the jre directory and typed java c:\app2\app2, but it...
0
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to...
15
by: Xah Lee | last post by:
On Java's Interface Xah Lee, 20050223 In Java the language, there's this a keyword “interface”. In a functional language, a function can be specified by its name and parameter specs....
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.