﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Discuss Content Posted by Jon Winer / Article Discussions / Article Discussions by Author  / Reduce Database RoundTrips Using XML / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 20 Jun 2013 05:40:35 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Reduce Database RoundTrips Using XML</title><link>http://www.sqlservercentral.com/Forums/Topic144630-30-1.aspx</link><description>&lt;P&gt;I use this a lot and it is a huge performance booster. Is there any reason that you shouldn't use the text or ntext data type as input to the stored procedure to avoide the 4000 byte limit? That would allow you 2,147,483,647 and 1,073,741,823 bytes respectively. I can't see passing that much data being practical, but you can blow out 4000 bytes quickly in an xml document. m I missing something here?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Syntax&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;sp_xml_preparedocument&lt;/B&gt; &lt;I&gt;hdoc &lt;/I&gt;&lt;B&gt;OUTPUT&lt;/B&gt;[&lt;B&gt;,&lt;/B&gt; &lt;I&gt;xmltext&lt;/I&gt;][&lt;B&gt;,&lt;/B&gt; &lt;I&gt;xpath_namespaces&lt;/I&gt;] &lt;/P&gt;&lt;H5&gt;Arguments&lt;/H5&gt;&lt;P&gt;&lt;I&gt;hdoc&lt;/I&gt;&lt;/P&gt;&lt;P class=indent&gt;Is the handle to the newly created document. &lt;I&gt;hdoc&lt;/I&gt; is an integer.&lt;/P&gt;&lt;P&gt;[&lt;I&gt;xmltext&lt;/I&gt;]&lt;/P&gt;&lt;P class=indent&gt;Is the original XML document. The MSXML parser parses this XML document.  &lt;I&gt;xmltext&lt;/I&gt; is a text &lt;FONT color=#ff1111&gt;(&lt;B&gt;char&lt;/B&gt;, &lt;B&gt;nchar&lt;/B&gt;, &lt;B&gt;varchar&lt;/B&gt;, &lt;B&gt;nvarchar&lt;/B&gt;, &lt;B&gt;text&lt;/B&gt;, or &lt;B&gt;ntext&lt;/B&gt;)&lt;/FONT&gt; parameter. The default value is NULL, in which case an internal representation of an empty XML document is created.&lt;/P&gt;&lt;P&gt;[&lt;I&gt;xpath_namespaces&lt;/I&gt;]&lt;/P&gt;&lt;P class=indent&gt;Specifies the namespace declarations that are used in row and column XPath expressions in OPENXML. The default value is &lt;B&gt;&amp;lt;root xmlns:mp="urn:schemas-microsoft-com:xml-metaprop"&amp;gt;&lt;/B&gt;.&lt;I&gt;xpath_namespaces&lt;/I&gt; provides the namespace URIs for the prefixes used in the XPath expressions in OPENXML by means of a well-formed XML document. &lt;I&gt;xpath_namespaces &lt;/I&gt;declares the prefix that must be used to refer to the namespace &lt;B&gt;urn:schemas-microsoft-com:xml-metaprop&lt;/B&gt;, which provides meta data about the parsed XML elements. Although you can redefine the namespace prefix for the metaproperty namespace using this technique, this namespace is not lost. The prefix &lt;B&gt;mp&lt;/B&gt; is still valid for &lt;B&gt;urn:schemas-microsoft-com:xml-metaprop&lt;/B&gt; even if &lt;I&gt;xpath_namespaces&lt;/I&gt; contains no such declaration. &lt;I&gt;xpath_namespaces &lt;/I&gt;is a text (&lt;B&gt;char&lt;/B&gt;, &lt;B&gt;nchar&lt;/B&gt;, &lt;B&gt;varchar&lt;/B&gt;, &lt;B&gt;nvarchar&lt;/B&gt;, &lt;B&gt;text&lt;/B&gt;, or &lt;B&gt;ntext&lt;/B&gt;) parameter. &lt;/P&gt;</description><pubDate>Tue, 29 Nov 2005 18:55:00 GMT</pubDate><dc:creator>Michael-155044</dc:creator></item><item><title>RE: Reduce Database RoundTrips Using XML</title><link>http://www.sqlservercentral.com/Forums/Topic144630-30-1.aspx</link><description>&lt;P&gt;Grate article. I find it very helpful&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description><pubDate>Mon, 29 Nov 2004 15:16:00 GMT</pubDate><dc:creator>Josh Williams-153777</dc:creator></item><item><title>Reduce Database RoundTrips Using XML</title><link>http://www.sqlservercentral.com/Forums/Topic144630-30-1.aspx</link><description>Comments posted to this topic are about the content posted at &lt;A HREF=http://www.sqlservercentral.com/columnists/jwiner/reducedatabaseroundtripsusingxml.asp&gt;http://www.sqlservercentral.com/columnists/</description><pubDate>Wed, 03 Nov 2004 16:42:00 GMT</pubDate><dc:creator>jwiner</dc:creator></item></channel></rss>