The following mapping XML is a sample Order mapping.
<?xml version="1.0"?> <!DOCTYPE XmlMappingSpec SYSTEM "abtxmap.dtd"> <XmlMappingSpec Name="JrcMappings"> <ClassElementMapping ElementTagName="Order" ClassName="JrcOrder> <AttributeMapping ClassAttribute="orderNumber" > <Attribute>number</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="status"> <Attribute>status</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="datePlaced" AttributeClassCreationMethod="dateFromIbmIsoString:"> <Attribute>Order.date</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="customer"> <SubElement>Customer</SubElement> </AttributeMapping> <AttributeMapping ClassAttribute="lineItems"> <SubElement>LineItem</SubElement> </AttributeMapping> </ClassElementMapping> <ClassElementMapping ElementTagName="Customer" ClassName="JrcCustomer"> <AttributeMapping ClassAttribute="number"> <SubElement>CustomerID</SubElement> <Attribute>number</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="name"> <SubElement>CustomerID</SubElement> <Attribute>name</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="street"> <SubElement>Address</SubElement> <Attribute>Street</Attribute> </AttributeMapping> </ClassElementMapping> <ClassElementMapping ElementTagName="LineItem" ClassName="JrcLineItem"> <AttributeMapping ClassAttribute="quantity" StringConversionMethod="asNumber"> <Attribute>Quantity</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="item"> <SubElement>Item</SubElement> </AttributeMapping> </ClassElementMapping> <ClassElementMapping ElementTagName="Item" ClassName="JrcProduct"> <AttributeMapping ClassAttribute="number" > <Attribute>number</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="description"> <Attribute>Description</Attribute> </AttributeMapping> <AttributeMapping ClassAttribute="price"> <Attribute>UnitPrice</Attribute> </AttributeMapping> </ClassElementMapping> </XmlMappingSpec>