Introduction
Relational database exploits structured query language to search for information and data modeled into a system transformed into analogous and extract data out of database and model into a particular data scheme using XML. Data is rendered as XML before sent back to client and XML data is stored in an ad hoc relational table in binary large object fields. XML and database represent the key alliance for data-driven and interoperable applications.
Reading XML Data from Database
There are two ways to retrieve data from as XML, use the XML extension to select command or execute a query on particular text. SQL server does not mark these fields with attribute to indicate XML data.
SQL Server XMLExtensions
XML support in SQL server 2000 which provide URL driven access to database resources and possibilities of using Xpath queries to select the data from relational tables and does not create ad hc storage structure to XML data.
- Access SQL server URL
The Internet information service allow to directly query commands to SQL server by HTTP. - Create XML schema
It is used to represent a result set as an XML document and specify the mapping rules between the native field and xml attribute and element.The XML document can be queried using Xpath expressions. - Retrieve gathered data
The database internal engine is capable of formatting the raw column data to XML fragments and strings to callers. - Inserted data as an XML document
Read the relational data to hierarchal XML documents and write XML data to tables source document is preprocessed by system stored and parsed document is passed to module.
XML Auto mode
Auto mode return data packed as XML fragments without root node and the name of each node. The XML output automatically group child records by the below code:
- < Customers customerID = "ALERT" ContactName = "Maria Anders" >
- < orders OrderID = "2064" / >
- < Orders OrderId = "2054" / >
- < Orders OrderId = "1033" / >
- </ Customers >
- < Customers CustomerID = "ALERT" ContactName = " Ana Bella " >
- < Orders OrderId = "1243" / >
- < Orders OrderId = "3423" / >
- < /Customer >

Join the conversation! Your thoughts help the community grow.