Understanding the XML source adapter

When Integration Manager extracts data from your XML source, it uses the properties in the XML Source Definition window to convert the XML data into a document definition it can use. For example, while XML uses terms like “element” and “attribute,” Integration Manager uses the terms recordsets and fields. The document definition serves as a structure that not only holds the XML data but also allows you to map the XML structure of the source to another type of structure in the destination.

You will see how Integration Manager uses this document definition later when you map the source to a destination. In the meantime, the following example shows how the XML source adapter converts XML for Integration Manager. You can use the table at the end of the example as a reference when you specify properties in the XML Source Definition window.

If you were to use the following XML as source data:

<Orders>
	<Orders>
		<Name>My Order</Name>
		<OrderNumber>123</OrderNumber>
		<CreditCard>
			<Type>americharge</Type>
			<exp>05/01/07</exp>
			<Number>1234112233224455</Number>
		</CreditCard>
		<Item>
			<Name>T-Shirt</Name>
			<size>Medium</size>
			<price>12.99</price>
		</Item>
	</Orders>
</Orders>

It would appear as the following tree view in Integration Manager:

The following table shows how Integration Manager interprets XML. The second and fourth columns include information from the previous example.

This component in XML...

 

Becomes this Integration Manager component...

Root element

<Orders>

Root recordset

An element containing data

<OrderNumber>123</OrderNumber>

A field (All fields lie within a recordset.)

An element containing child elements or attributes.

<Item>

A recordset


The root recordset is not necessarily the root element in the XML source file. Instead, the XML source adapter looks for the first XML element that matches the value of the root recordset’s XML Node as defined in the XML Source Definition window. In the previous table, the display name of “Order” (in the fourth column) matches the XML root element name of “Order.” You can change the display name of the root recordset, other recordsets, and fields in the XML Source Properties window.



Documentation Feedback