IBM Database Add-Ins for Visual Studio  

Select XML Source for Project  (DB2)

Use the Select XML Source for Project window to specify the information for adding an XML document and an XML schema and their associated references to a Visual Studio project.

To open the Select XML Source for Project window:


Connection
Select the DB2® data server that contains the XML data against which you want write LINQ to XML queries in the .NET application.
Use registered XML schema
Click to use an XML schema document that is registered in the XML Schema Repository of the selected data server.
Owner
Select the name of the database schema in which the XML schema is stored.
XML schema name
Select the name of the XML schema in the XML Schema Repository to use as the source.

This option generates a sample XML document from the selected XML schema. Both the XML schema and the generated sample XML document are copied to the project directory. References to both the XML schema and the XML document are added to the project.

Use document stored in column
Click to use a document that is stored in a database column of type XML. Click Ellipsis button to open the Select XML Column window and then select the database table and XML column.

This option generates an XML schema for the XML document that is stored in the selected XML column of the first record in the table. Both the XML document and the generated XML schema are copied to the project directory. References to both the XML document and the XML schema are added to the project.

Use document from file
Click to use an XML document from the file system as the source. Click Ellipsis button to browse to and select the file.

This option generates an XML schema for the selected XML document. Both the XML document and the generated XML schema are copied to the project directory. References to both the XML document and the XML schema are added to the project.

Generate class to map to XML source
Select to generate a mapping class with the sample code. The class represents the XML document that is added to Visual Studio project. The class is named after the XML document file name.

See Also

Setting up .NET Applications to Write LINQ to XML Queries on XML Data | Overview: Setting up .NET Applications to Write LINQ to XML Queries on XML Data


.NET Development Forum   developerWorks: Visual Studio .NET   DB2 FAQs   IDS FAQs

© Copyright IBM Corporation 2002, 2012. All Rights Reserved.