I am working in the RAD6 environment and attempting to learn EMF as a way
of doing some basic Java / XML binding tasks. Can someone tell me if EMF
supports the functions listed below and if so, where I might find both the
api documentation and some key code samples to get started. I am really
struggling to find code samples and documentation. I have been bouncing
all over following leads but to no avail. I've looked at xmlbeans and
Castor and found ample examples and clear documentation. Probably my fault
but nonetheless, I need some help.
Thanks.

I need to be able to do the following:
1. Unmarshal an xml document from either a file stream or a String, into
the java classes represented in the genmodel.
2. Call a validate method to make sure that the document is in fact well
formed and valid according to the schema.
3. Construct the java object representing a document then call a validate
method to ensure that the object would yield a valid document.
4. Unmarshal the object into a valid XML document.

and invoke "Generate Test Code" you'll generate a working example (e.g.,
LibraryExample.java) that shows how to create a document and serialize
it as well as how to load a document and validate it. You can follow
the same steps, but for your own schema.

We spend more time providing rich function than we do providing copious
documentation, but as a developer, I'm sure you can relate to that
dilemma. On the plus side, the second edition of the EMF book should be
ready to send to the publishers really soon...

adam berk wrote:
> I am working in the RAD6 environment and attempting to learn EMF as a
> way of doing some basic Java / XML binding tasks. Can someone tell me
> if EMF supports the functions listed below and if so, where I might
> find both the api documentation and some key code samples to get
> started. I am really struggling to find code samples and
> documentation. I have been bouncing all over following leads but to no
> avail. I've looked at xmlbeans and Castor and found ample examples
> and clear documentation. Probably my fault but nonetheless, I need
> some help.
> Thanks.
> I need to be able to do the following:
> 1. Unmarshal an xml document from either a file stream or a String,
> into the java classes represented in the genmodel.
> 2. Call a validate method to make sure that the document is in fact
> well formed and valid according to the schema.
> 3. Construct the java object representing a document then call a
> validate method to ensure that the object would yield a valid document.
> 4. Unmarshal the object into a valid XML document.
>
>

and invoke "Generate Test Code" you'll generate a working example (e.g.,
LibraryExample.java) that shows how to create a document and serialize
it as well as how to load a document and validate it. You can follow
the same steps, but for your own schema.

We spend more time providing rich function than we do providing copious
documentation, but as a developer, I'm sure you can relate to that
dilemma. On the plus side, the second edition of the EMF book should be
ready to send to the publishers really soon...

adam berk wrote:
> I am working in the RAD6 environment and attempting to learn EMF as a
> way of doing some basic Java / XML binding tasks. Can someone tell me
> if EMF supports the functions listed below and if so, where I might
> find both the api documentation and some key code samples to get
> started. I am really struggling to find code samples and
> documentation. I have been bouncing all over following leads but to no
> avail. I've looked at xmlbeans and Castor and found ample examples
> and clear documentation. Probably my fault but nonetheless, I need
> some help.
> Thanks.
> I need to be able to do the following:
> 1. Unmarshal an xml document from either a file stream or a String,
> into the java classes represented in the genmodel.
> 2. Call a validate method to make sure that the document is in fact
> well formed and valid according to the schema.
> 3. Construct the java object representing a document then call a
> validate method to ensure that the object would yield a valid document.
> 4. Unmarshal the object into a valid XML document.
>
>