Database Reference
In-Depth Information
Listing 9-1 . Simple XML Format Using Elements
<root>
<node>
<subnode>value</subnode>
<anothersubnode>1</anothersubnode>
</node>
<node>
<subnode>value</subnode>
<anothersubnode>2</anothersubnode>
</node>
</root>
Alternatively, the XML Source works well when values are listed as attributes, as
shown in Listing 9-2 . This format is similar to the output you would get from a
SELECT ... FROM XML RAW statement in SQL Server.
Listing 9-2 . Simple XML Format Using Attributes
<root>
<row CustomerID="1" TerritoryID="1"
AccountNumber="AW00000001" />
<row CustomerID="2" TerritoryID="1"
AccountNumber="AW00000002" />
</root>
Dealing with Multiple Outputs
The XML samples in Listings 9-1 and 9-2 will produce a single output in the XML
Source. If your XML format has multiple levels of nested elements, the XML Source
will start to produce more than one output. These outputs will be linked by automatic-
ally generated _Id columns, which you may need to join further downstream using a
Merge Join transform.
 
 
 
Search WWH ::




Custom Search