IBM Database Add-Ins for Visual Studio  

Enhancements for Managing XML Data  (DB2)

The IBM® Database Add-Ins for Visual Studio help you manage XML relational data.

Annotating XML schemas

The add-ins provide the functionality for you to decompose data from XML documents and store the data into columns in DB2 database tables. The documents that specify how to decompose XML data are the annotated XML schemas.

Using a Web service as an XML schema source
You can choose to annotate either an XML schema that is registered in the XML Schema Repository or an XML schema file. Additionally, you can choose a Web service as the XML schema source to annotate. The XML schema is inferred from the WSDL result of the Web service.
Using a Web service to test an annotated XML schema
In addition to using an XML document to test an annotated XML schema, you can use a Web service as the XML input for testing. In this case, the XML input is the XML that is generated by invoking a selected method of the Web service.

Comparing XSR objects

As an XML schema evolves, if you register updated versions of the XML schema in the XML Schema Repository (XSR), you can compare XSR objects to see the differences between the schema versions.

In the XSR Object Compare window, you can select from a menu of options to use in the comparison process. For example, you can select an option to ignore comments in the XSR objects that you are comparing.

If an XSR object contains dependencies, the dependencies are listed in the XSR Object Compare window so that you can select all or any of the individual dependencies. For example, you can select either the master document or one its dependent documents to compare.

The difference between two XSR objects is saved in a file and displayed with color-coding to show the added, removed, changed, and moved code.

Generating Web services from XML schemas

Using an annotated XML schema, you can generate ADO.NET code and add the generated files to an ASP.NET Web Services project. The code is generated in the language of the project that the code is added to.

After you select the Generate Web Method command on the shortcut menu of the annotated XML schema in the Server Explorer, the Web method code is generated. The generated code is added to the ASP.NET Web Services project that is open in the Solution Explorer, and is marked as a Web method. You can build your project and deploy the Web method as a Web service.

Generating XML validation and XSL transformation code

A Generate XML Helper Code command on the shortcut menu of the XML Schema Repository node in the Server Explorer lets you create a project in the Solution Explorer that contains sample code.

The created project includes an XMLUtil.cs file that contains sample code for XML validation and XSL transformation. The code also provides you with a starting point for coding.

When you run the sample code, an XML Sample window is displayed that contains Validate Sample and Transform Sample command buttons for validating sample XML code and transforming sample XSL code.


See Also

For additional information about these XML enhancements, refer to articles in the Visual Studio .NET section of developerWorks.


.NET Development Forum   DB2 FAQs

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