Using XML to Access SQL Server

3 4

"XML" stands for "Extensible Markup Language," but XML is not actually a language. Rather it is a system for defining other languages and a common syntax for expressing structure in data. Unlike HTML, which is a markup language used strictly for specifying how a Web document is presented, XML specifies the content and structure of a document. Structured data is data that is tagged for its content or use.

XML is inherently extensible. Developers use XML to define data within Web pages, and the level of detail is limited only by the needs of the developer. For example, a developer would use <AUTHOR> or <TITLE> tags to describe information about books and publications. If additional definitions are needed, the developer could add <RETAILPRICE>, <PUBLISHER>, or even <ISBN> tags. Using XML is similar to building a table in a database, which involves determining which data elements, or columns, are necessary to fully describe the data rows in the table for the needs of the application.

Because XML does not describe presentation, an XML document can be written once and then displayed in a variety of ways using different devices: through a Web browser, a cellular phone, an in-car display for automobiles, and so forth. Each of these devices might have specific display requirements: a computer monitor might display 800 x 600 pixels, whereas a wireless Internet device might support only 200 x 200 pixels. Because XML defines only the structure and content of the document, each device will be able to render a version of the document specifically tailored for its display by using its own integrated XML browser. Unlike HTML documents, XML documents can be useful long after the authoring and display technologies available when they were written become obsolete.

The real strength of XML is its ability to interact with the Document Object Model (DOM), an interface that defines the mechanisms for accessing data in a document. Using DOM, developers can script dynamic content in a standardized way. For example, developers can use DOM to cause a specific piece of content to behave in a certain way. Small effects can be added by using this method, such as a piece of text—say, a book's title in an XML tag called <TITLE>—that changes colors as the user's pointer moves over it and that is a hyperlink to an online bookstore. Achieving such effects is currently not such a trivial task, with proprietary DOMs and style sheet specifications currently the trend, but new DOM standards from the World Wide Web Consortium (W3C) will help XML developers maintain true platform independence.

XML is also fast becoming a standard for exchanging data and documents. XML is being used to exchange data between heterogeneous database systems on the Internet. For instance, an automobile parts supplier could use XML to exchange inventory data with an automobile manufacturer, even though the two might be using two completely different database systems on two different platforms. Because XML describes how data is structured, it can bridge the two otherwise incompatible systems seamlessly.



Microsoft SQL Server 2000 Administrator's Companion
Microsoft SQL Server 2000 Administrators Companion
ISBN: B001HC0RPI
EAN: N/A
Year: 2005
Pages: 264

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