Ask a question
          

XML & SQL Server

<<Previous  Next>>

What is the purpose of FOR XML in SQL Server?
What is the OPENXML statement in SQL Server?

XML and Sql server - August 12, 2008 at 18:00 PM by Amit Satpute

What is the purpose of FOR XML in SQL Server?

Answer
SQL Server 2000 provides the facility to retrieve data in the form of XML with the help of the FOR XML clause appended to the end of a SELECT statement.

There are 3 types of FOR XML modes — RAW, AUTO, and EXPLICIT.

They all generate a different style of XML document

What is the OPENXML statement in SQL Server?

Going through thousands of lines of XML degrades performance to a great extent.This is where the OPENXML function comes into use. It does the parsing work for you quite efficiently.

The syntax of OPENXML is:

OPENXML(idoc int [in],rowpattern nvarchar[in],[flags byte[in]]) [WITH (SchemaDeclaration | TableName)]

OPENXML function is supposed to be used with two system stored procedures:

1.sp_xml_preparedocument
2.sp_xml_removedocuments  

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


More XML Links

What is XML?

Answer - XML, Extensible Markup Language, is an open, text based markup language that provides structural and semantic information to data...............

Indexing XML data in SQL Server 2005

Explain the concepts of indexing XML data in SQL Server 2005.
Provide basic syntax for creating index on XML data type column.
What is content indexing/full text indexing?
Explain the reason to index XML data type column.
What are the guidelines to be adhered when creating a XML index?

List the rules to be followed by an XML document.

Answer - They must have a root tag, the document should be well formed : the tags should be properly closed, since XML is case sensitive, one should take care..............

SQL Server 2005 XML support

Explain the concepts and capabilities of SOAP. Explain the purpose of Native XML mode in SQL Server 2005.
Native XML Access vs. SQLXML.
Benefits of Native XML Access in SQL Server 2005.
Limitation for Native XML Web Services.

Define DTD (Document Type definition).

Answer - XML DTD is a rule book that an XML document follows. Once DTD is ready, you can create number of XML documents following the same rules..............

 
Latest placement tests
Latest links
 
 
Home | Login | About us | Sitemap | Contact us