Skip Headers

# Creating an XML Project From an XML Schema

Previous

Next

If you have an existing data model (XML schema document), but you do not have a corresponding object model (Java classes for domain objects), use this procedure to create your TopLink project and automatically generate the corresponding object model.

Note: If you have both XSD and object model classes, you can create an XML project using the procedure described in "Using TopLink Workbench".

Using the TopLink JAXB compiler simplifies JAXB application development with TopLink by automatically generating both the required JAXB files and the TopLink files from your XML schema (XSD) document. Once generated, you can open the TopLink Workbench project to fine-tune XML mappings without having to recompile your JAXB object model.

You can use the TopLink JAXB compiler from TopLink Workbench (see "Using TopLink Workbench") or from the command line (see "Using the Command Line"). Oracle recommends that you use TopLink Workbench.

Note: Before you compile your generated classes, be sure to configure your IDE classpath to include `<``ORACLE_HOME``>\lib\xml.jar`. For example, see Using an Integrated Development Environment.

For more information, see the following:

- "TopLink Support for Java Architecture for XML Binding (JAXB)"

- "Using TopLink JAXB Compiler Generated Files at Run Time"