Tutorial Guide > Transform Table and XML Data Tutorials > Create an XML Definition Set for the Tutorial
 
Create an XML Definition Set for the Tutorial
There is one Studio resource that you must create before starting this tutorial. It is a simple XML definition set. This procedure provides the code for you to copy and paste into the Studio editor to create the resource.
To create the XML definition set
1. Open Studio.
2. Select Shared on the Studio resource tree.
3. Right-click and select New Definition Set.
4. Type XMLdefinitionSet.
5. Select XML as the Type.
6. Click OK.
7. Copy and paste the following XML into the definition set editor:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="foo" targetNamespace="foo" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:element name="Customers" type="ns1:Customers"/>
<xs:complexType name="Customer">
<xs:sequence>
<xs:element name="customerID" type="xs:integer"/>
<xs:element name="customerName" type="xs:string"/>
<xs:element name="customerEmail" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="unbounded" name="orders" type="ns1:Order"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Order">
<xs:sequence>
<xs:element name="orderID" type="xs:integer"/>
<xs:element name="orderSubTotal" type="xs:float"/>
<xs:element name="orderSalesTax" type="xs:float"/>
<xs:element name="orderTotal" type="xs:float"/>
<xs:element name="orderSubmitDate" type="xs:date"/>
<xs:element name="orderProcessDate" type="xs:date"/>
<xs:element name="orderShipDate" type="xs:date"/>
<xs:element minOccurs="0" maxOccurs="unbounded" name="orderItems" type="ns1:OrderItem"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrderItem">
<xs:sequence>
<xs:element name="orderItemID" type="xs:integer"/>
<xs:element name="orderItemName" type="xs:string"/>
<xs:element name="orderItemDescription" type="xs:string"/>
<xs:element name="orderItemQuantity" type="xs:int"/>
<xs:element name="orderItemPrice" type="xs:float"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Customers">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="customer" type="ns1:Customer"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
 
8. Save the definition set.