XML -> Java code generator.

Greg Messner gmessner at vsi.com
Wed Jan 19 22:06:45 GMT 2000


Take a look at Breeze Commerce Studio. Breeze does everything you describe
plus much more and it's free. Following is a description:

Breeze Commerce Studio (Breeze) is a visual developer's tool that imports
schema from XML DTDs, XML documents, and JDBC/ODBC connectable databases.
Once a schema has been imported, Breeze allows the developer to
interactively add data types and constraints to the elements of the schema.
>From this modified schema, Breeze creates Java 1.1/1.2 compliant code that
allows a programmer to access the contents of a  XML document like the
properties of a standard JavaBean. In addition to methods for accessing the
contained XML document, Breeze also generates methods to read and write XML
objects to and from XML document streams.

>From a programmers point of view, Breeze generates Java 1.1/1.2 compliant
code that greatly simplifies access to XML documents, XML based messaging,
or just about any source of XML as well as providing basic object to
relational mapping for databases. Breeze was and is used extensively in it's
own development.

For a look at the programming aspect of Breeze vs. DOM take a look at:

	http://www.vsi.com/breeze/justsayno.html

For an overview of Breeze go to:

	http://www.vsi.com/breeze/


Greg Messner
Director of E-Commerce Technologies, VSI


-----Original Message-----
From: Kevin A. Burton [mailto:burton at relativity.yi.org]
Sent: Wednesday, January 19, 2000 1:40 PM
To: xml-dev at ic.ac.uk
Subject: XML -> Java code generator.


So I am looking for a decent API that allows me to think of an XML
document as a Java object... and not in terms of DOM/SAX and also allows
me to abstract what XML parser that I am using so that it can be either
XML4J/Xerces/etc.

So for code like the following


<!ELEMENT rss (channel)>
<!ATTLIST rss
          version     CDATA #REQUIRED> <!-- must be "0.91"> -->

<!ELEMENT channel ( title | description )*>
<!ELEMENT title (#PCDATA)>
<!ELEMENT description (#PCDATA)>


You would get 
------------------

package mypackage;

import org.w3c.dom;
import java.io.IOException;

public class RSSDocument {

	public RSSDocument(String URL) throws IOException {
		//parse out the dom and store it as a private
		//member... impl here
	}

	public String getTitle() {
		//impl here
	}

	public String getDescription() {
		//impl here
	}

	public String getVersion() {

	}

}

Also, an element with an ATTLIST would be treated as members of a java
object.

Thoughts?  If I have to write my own code here it will be done as Open
Source.

Kevin

-- 
Kevin A Burton
Senior Software Engineer
Kendara Inc
http://www.kendara.com
Mobile:  408-910-6145
Linux - The revolution will NOT be televised

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN
981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer
to OASIS.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions now closed in preparation for transfer to OASIS.





More information about the Xml-dev mailing list