Module 3: Validating

In this lesson, participants learn the parts of an XSD schema and how to generate one from a Microsoft Access 2002 table. The concept of data types is restricted to discussing two main categories of data types, simple and complex types. The syntax of declaring attribute and element names is discussed. | Appendix C Appendix to Chapter 9 SQL XML You can use this appendix to extend your knowledge of Microsoft SQL Server 2000 support for Extensible Markup Language XML . This continues where Module 9 SQL XML leaves off. In addition there are two lab exercises at the end of this appendix. To begin them you must first complete the first two exercises in Lab 9. Lesson FOR XML and OpenXML In this lesson you will learn about the FOR XML and OpenXML query types. FOR XML Introduction To query a SQL Server database the XML query must specify the type of output required. This is indicated by the mode in the FOR XML clause. There are three modes to choose from RAW AUTO and EXPLICIT. You can specify three additional parameters to return particular XML output. You determine the form of the output by using these various modes and parameters. The form of the output depends on your application requirements and what other uses you plan to put the data to. 2 Appendix C Appendix to Chapter 9 SQL XML Syntax The syntax of the FOR XML clause is FOR XML mode XMLDATA ELEMENTS BINARY BASE64 The arguments that you can use in the FOR XML clause are listed in the following table. Argument Purpose mode The XML mode determines the shape of the resulting XML. It can be RAW AUTO or EXPLICIT. You must specify one mode. XMLDATA If the XMLDATA option is specified a schema should be returned. The schema is prepended to the document as an inline schema. ELEMENTS If the ELEMENTS option is specified the columns are returned as subelements. Otherwise they are mapped to XML attributes. This option is supported in AUTO mode only. BINARY BASE64 When the BINARY BASE64 option is specified any binary data returned by the query is represented in base64-encoded format. To retrieve binary data in RAW and EXPLICIT mode this option must be specified. In AUTO mode binary data is returned as a reference by default. FOR XML RAW The use of the RAW mode means that the results of the query are represented by a row element .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
18    84    1    17-06-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.