O'Reilly logo

EMF: Eclipse Modeling Framework Second Edition by Frank Budinsky, Ed Merks, Marcelo Paternostro, Dave Steinberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. XML Schema

If you wish to create an object model for manipulating an XML data structure of some type, EMF provides a particularly desirable approach based on XML Schema. EMF can create an Ecore model that corresponds to a schema, allowing you to leverage the code generator, or dynamic EMF, to provide a Java API for manipulating instances of that schema.

At a high level, the mapping to Ecore is quite simple:

  • A schema maps to an EPackage.
  • A complex type definition maps to an EClass.
  • A simple type definition maps to an EDataType.
  • An attribute declaration or element declaration maps to an EAttribute if its type maps to an EDataType, or to an EReference if its type maps to an EClass.

From a modeling perspective, however, XML Schema is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required