Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress XML Binding Development Guide

6.3 An International Purchase Order Instance Document

We begin with a simple instance document.

The instance document contains a billTo element. As you can see from the schema in the preceding section, a billTo is an Address. The Address type has two extensions, USAddress and UKAddress, and a billTo element can be either of these types. Elements with substitutable types are required to have an xsi:type attribute that clarifies the actual type of the element.

When unmarshaling an instance document that contains substitutable elements, HydraExpress uses the xsi:type attribute to determine the correct class type to create. In your application code, you can use the class getTypeId() method to determine its type.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.