File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Source generator in castor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Source generator in castor" Watch "Source generator in castor" New topic

Source generator in castor

Madhumitha Baskaran
Ranch Hand

Joined: Feb 27, 2010
Posts: 66
While converting xml to java objects using Source Generator, there is a types package getting generated automatically.
I would like to know why it is generated and how useful it is?

David Newton

Joined: Sep 29, 2008
Posts: 12617

You mean the schema types? If so, it's generated for the exact reason stated in the documentation:
Castor docs wrote:Some Schema types do not have a corresponding type in Java. Thus the Source Generator uses Castor implementation of these specific types (located in the types package). For instance the duration type is implemented directly in Castor. Remember that the representation of XML Schema datatypes does not try to fit the W3C XML Schema specifications exactly. The aim is to map an XML Schema type to the Java type that is the best fit to the XML Schema type.
I agree. Here's the link:
subject: Source generator in castor
It's not a secret anymore!