struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Higdon, Brian [VIS-Non J&J]" <BHIG...@VISUS.JNJ.com>
Subject RE: Generate Java class from xml?
Date Wed, 17 Dec 2003 19:31:53 GMT
Have you looked at XML beans:

http://xml.apache.org/xmlbeans/



-----Original Message-----
From: Vicky [mailto:javaxmlsoapdev@yahoo.com]
Sent: Wednesday, December 17, 2003 2:01 PM
To: struts-user@jakarta.apache.org
Subject: Generate Java class from xml?


Does anyone have an idea of how i can generate .java file from xml file?
Tools like jakrata digester, JOX are there but both of them are useful in
populating java beans from xml. My requirement is to generate .java file
from .xml with getters and setters methods for xml elements/attributes. I
also tried JAXB. But JAXB generates bunch of files and most of them are
interfaces, which is not going to work for me. 
 
For e.g. i have following xml file and i want to generate Address.java file
with getters/setters. Any ideas? 
<?xml version='1.0' encoding='UTF-8' ?>
 <Address>
    <FirstName type="String"/>
    <PoBox type="int"/>
..............
</Address>
 
 
Thanks,
Vicky




---------------------------------
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message