XML Task


The XML task is a new comprehensive task that can perform many different functions with your XML files. It allows SSIS to dynamically modify, merge, or create XML files at runtime. The functions this task can perform include the following:

  • Take a series of XML files and merge them into a single file

  • Prepare an XML file for a report by applying an XSLT style sheet to it

  • Select out pieces of an XML file using XPATH

  • Compare two XML files and write the differences to an XML Diffgram

  • Validate the XML files against a Document Type Definition (DTD)

You configure the task through the XML Task Editor in the General tab. This very large dialog box changes based on what OperationType you select. The OperationType option has several different types of settings:

  • Validate: Validates the XML document against the Document Type Definition (DTD) document or the XML Schema Definition (XSD) schema

  • XSLT: Performs an XSL transformation against your XML document

  • XPATH: Performs an XPATH query against the XML document

  • Merge: Merges two XML documents into a single file

  • Diff: Compares two XML documents

  • Patch: Creates a new document from the previously mentioned Diff operation

If you're using the XPATH OperationType, you can set the XPathStringSource option to determine what options you'd like to query in the XML file. Figure 3-24 shows an example of how to use the XPATH operation to pull certain countries out of the orders.xml file and output the results to a variable called XPathResult.

image from book
Figure 3-24



Professional SQL Server 2005 Integration Services
Wireless Java : Developing with Java 2, Micro Edition
ISBN: 189311550X
EAN: 2147483647
Year: 2006
Pages: 182

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net