<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>LiquidFoot &#187; XML</title>
	<atom:link href="http://www.liquidfoot.com/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 17 Apr 2010 16:36:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Solr Schema</title>
		<link>http://www.liquidfoot.com/2007/10/05/solr-schema/</link>
		<comments>http://www.liquidfoot.com/2007/10/05/solr-schema/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 20:27:02 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=178</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever worked on a project that involved Coldfusion&#8217;s bundled version of Verity, you&#8217;ve no doubt run into the issue of trying to confine your fields into the structure that Verity imposes, and those custom fields are really precious in these instances. About 6 months ago, I ran into an issue with a search project where I had about 125,000 documents to index. Since we also wanted to be able to use the indexes for some other projects, I was a bit nervous to commit almost the entire allotment of indexable objects to one collection. This launched me into writing a custom search engine and indexer using Lucene and slapping Coldfusion around the responses to do things that Verity did. However, once the projects were complete, I never really got around to making it easy to use. It does cool stuff like search across multiple collections, context highlighting, relevancy calculations, term vector calculations, &#8220;did you mean&#8221;, etc. Essentially everything I think all good search engines need to be able to do. Something this system lacked was an easy way to define the fields that you wanted indexed (along with a knowledge of Java to actually make the changes).</p>
<p>The ability to create any number of fields to index in different ways (along with faceting) is a real strong point of Solr. Not only can you add fields and choose how that data is analyzed, you can create your own field types that process the information in your index the way you want them to be.</p>
<p>This is done in the <code>$SOLR_HOME/config/schema.xml</code> file. The first section (&lt;types&gt;) defines the types of fields that you will be using, and how Solr should process them with Lucene. If you look at some of the fieldtypes, you&#8217;ll get an idea of what&#8217;s possible. For instance, the fieldtype for &#8220;string&#8221; is an untokenized field that doesn&#8217;t normalize the fields and sorts missing information last.</p>
<div class="code"><span style="color: #ff8000;">&lt;fieldtype name=<span style="color: #0000ff;">&#8220;string&#8221;</span> class=<span style="color: #0000ff;">&#8220;solr.StrField&#8221;</span> sortMissingLast=<span style="color: #0000ff;">&#8220;true&#8221;</span> omitNorms=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span></div>
<p>However, if you need a more robust fieldtype, look at the fieldtype for &#8220;text&#8221;. This uses a whitespace tokenizer (splits words with whitespace) and uses the stopwords defined in the stopwords.txt file. It does some other processing (filters words, converts them to lowercase, runs a porter stemmer, and then removes duplicates). This fieldtype also defines what to do when a query is passed to it (uses the same filters). This is slightly different than the defined &#8220;textTight&#8221; which does not perform any further analysis on the text when being queried. You&#8217;ll probably find that most of these work for most instances, but if you need to, you can build your own fieldtype that has very specific indexing and query filters.</p>
<p>The next section contains the actual fields you want to use in the aptly named &#8220;fields&#8221; element. This is where you actually define the fields that will be in your index, the type of analysis to perform on the field, if it should be indexed, stored, have term vectors, or be multivalued (have multiple instances of the same field in the index).</p>
<p>Let&#8217;s say you&#8217;re wanting to develop an indexing schema for books (hey, I work in a library). At a very basic level, you&#8217;d want a field for an id, title, author, reviews, and a set of topics (or tags). Your fields element would contain something along the lines of:</p>
<div class="code"><span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;id&#8221;</span> type=<span style="color: #0000ff;">&#8220;string&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;title&#8221;</span> type=<span style="color: #0000ff;">&#8220;text&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;true&#8221;</span> termVectors=<span style="color: #0000ff;">&#8220;true&#8221;</span> /&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;titleStr&#8221;</span> type=<span style="color: #0000ff;">&#8220;string&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;false&#8221;</span> multiValued=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;author&#8221;</span> type=<span style="color: #0000ff;">&#8220;text&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;true&#8221;</span>termVectors=<span style="color: #0000ff;">&#8220;true&#8221;</span> /&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;authorStr&#8221;</span> type=<span style="color: #0000ff;">&#8220;string&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;false&#8221;</span> multiValued=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;review&#8221;</span> type=<span style="color: #0000ff;">&#8220;text&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;true&#8221;</span> multiValued=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;topic&#8221;</span> type=<span style="color: #0000ff;">&#8220;text&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;true&#8221;</span> multiValued=<span style="color: #0000ff;">&#8220;true&#8221;</span> termVectors=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;topicStr&#8221;</span> type=<span style="color: #0000ff;">&#8220;string&#8221;</span> indexed=<span style="color: #0000ff;">&#8220;true&#8221;</span> stored=<span style="color: #0000ff;">&#8220;false&#8221;</span> multiValued=<span style="color: #0000ff;">&#8220;true&#8221;</span>/&gt;</span></div>
<p>You&#8217;ll notice that I have a couple of extra fields for title, author, and topic, these are for the faceting info and are just untokenized fields to make the calculations for facets a little more efficient.</p>
<p>Now, we&#8217;re almost done with creating the schema. We just need to declare a unique key, default search field, and default search operator.</p>
<div class="code"><span style="color: #000080;">&lt;uniqueKey&gt;</span>id<span style="color: #000080;">&lt;/uniqueKey&gt;</span><br />
<span style="color: #000080;">&lt;defaultSearchField&gt;</span>title<span style="color: #000080;">&lt;/defaultSearchField&gt;</span><br />
<span style="color: #000080;">&lt;solrQueryParser defaultOperator=<span style="color: #0000ff;">&#8220;OR&#8221;</span>/&gt;</span></div>
<p>Remember when I made the fields with the &#8220;Str&#8221; suffix? We can use a really cool feature of Solr called a &#8220;copyField&#8221; that literally copies the information from one field to another.</p>
<div class="code">&lt;copyField source=<span style="color: #0000ff;">&#8220;author&#8221;</span> dest=<span style="color: #0000ff;">&#8220;authorStr&#8221;</span>/&gt;<br />
&lt;copyField source=<span style="color: #0000ff;">&#8220;title&#8221;</span> dest=<span style="color: #0000ff;">&#8220;titleStr&#8221;</span>/&gt;<br />
&lt;copyField source=<span style="color: #0000ff;">&#8220;topic&#8221;</span> dest=<span style="color: #0000ff;">&#8220;topicStr&#8221;</span>/&gt;</div>
<p>It&#8217;s worth mentioning here that Solr indexes are not databases! While there are some similarities in the way that Solr allows you to add, update, select, store, and delete information from the index, Solr isn&#8217;t an RDBMS. I&#8217;ve seen a few discussions where there is some confusion as to why Solr can&#8217;t do the equivalent of a stored procedure, or some other function of a database.</p>
<p>Now, your index server is ready to receive documents to search against. The server, in with the above example as the schema, will expect information to be in the following format:</p>
<div class="code"><span style="color: #000080;">&lt;doc&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;id&#8221;</span>&gt;</span>1<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;title&#8221;</span>&gt;</span>Solr Rocks!<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;author&#8221;</span>&gt;</span>Barr, Foo<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;review&#8221;</span>&gt;</span>This book rocks!<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;review&#8221;</span>&gt;</span>This book is horrible!<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;topic&#8221;</span>&gt;</span>information retrieval systems<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;topic&#8221;</span>&gt;</span>xml<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;topic&#8221;</span>&gt;</span>search<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #ff8000;">&lt;field name=<span style="color: #0000ff;">&#8220;topic&#8221;</span>&gt;</span>apache foundation<span style="color: #ff8000;">&lt;/field&gt;</span><br />
<span style="color: #000080;">&lt;/doc&gt;</span></div>
<p>Next week when I get some time, I&#8217;ll write about creating facet queries&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2007/10/05/solr-schema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Real Life XSLT 2.0 transformations</title>
		<link>http://www.liquidfoot.com/2006/08/23/real-life-xslt-20-transformations/</link>
		<comments>http://www.liquidfoot.com/2006/08/23/real-life-xslt-20-transformations/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 18:56:31 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=208</guid>
		<description><![CDATA[I ran into a bit of a situation that was really blowing my mind. I have a rather large XML file (around 20,000+ lines) marked up in TEI that I wanted to do some transformations on (a day book and ledger from the 1850s). Essentially the code follows the format &#8230; &#60;figure&#62; &#60;head&#62;Page 12&#60;/head&#62; &#60;graphic [...]]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>I ran into a bit of a situation that was really blowing my mind. I have a rather large XML file (around 20,000+ lines) marked up in TEI that I wanted to do some transformations on (a day book and ledger from the 1850s). Essentially the code follows the format</p>
<div class="code">&#8230;<br />
<span style="color: #ff8000;">&lt;figure&gt;</span><br />
<span style="color: #000080;">&lt;head&gt;</span>Page 12<span style="color: #000080;">&lt;/head&gt;</span><br />
&lt;graphic url=<span style="color: #0000ff;">&#8220;0023_p12&#8243;</span>/&gt;<br />
<span style="color: #ff8000;">&lt;/figure&gt;</span></p>
<p>&lt;fw type=<span style="color: #0000ff;">&#8220;header&#8221;</span> place=<span style="color: #0000ff;">&#8220;top-center&#8221;</span>&gt;<br />
<span style="color: #000080;">&lt;name type=<span style="color: #0000ff;">&#8220;place&#8221;</span> key=<span style="color: #0000ff;">&#8220;7022220&#8243;</span>&gt;</span>Williamsburg<span style="color: #000080;">&lt;/name&gt;</span>,<br />
<span style="color: #000080;">&lt;date value=<span style="color: #0000ff;">&#8220;1850&#8243;</span>&gt;</span>1850<span style="color: #000080;">&lt;/date&gt;</span>,<br />
&lt;/fw&gt;</p>
<p><span style="color: #008080;">&lt;table&gt;</span><br />
<span style="color: #000080;">&lt;row&gt;</span><br />
<span style="color: #000080;">&lt;cell&gt;</span><br />
<span style="color: #000080;">&lt;date value=<span style="color: #0000ff;">&#8220;1850-10-03&#8243;</span>&gt;</span>&lt;choice&gt;<span style="color: #008000;">&lt;abbr&gt;</span>Oct<span style="color: #000080;">&lt;hi rend=<span style="color: #0000ff;">&#8220;sup;underline&#8221;</span>&gt;</span>r<span style="color: #000080;">&lt;/hi&gt;</span><span style="color: #008000;">&lt;/abbr&gt;</span><span style="color: #000080;">&lt;expan&gt;</span>October<span style="color: #000080;">&lt;/expan&gt;</span>&lt;/choice&gt; 3<span style="color: #000080;">&lt;hi rend=<span style="color: #0000ff;">&#8220;sup&#8221;</span>&gt;</span>th<span style="color: #000080;">&lt;/hi&gt;</span> 1850<span style="color: #000080;">&lt;/date&gt;</span><br />
<span style="color: #000080;">&lt;/cell&gt;</span><br />
<span style="color: #000080;">&lt;cell&gt;</span><br />
<span style="color: #000080;">&lt;name type=<span style="color: #0000ff;">&#8220;person&#8221;</span> key=<span style="color: #0000ff;">&#8220;griffss01&#8243;</span>&gt;</span>Doct<span style="color: #000080;">&lt;hi rend=<span style="color: #0000ff;">&#8220;sup;underline&#8221;</span>&gt;</span>r<span style="color: #000080;">&lt;/hi&gt;</span> S S Griffin<span style="color: #000080;">&lt;/name&gt;</span><br />
<span style="color: #000080;">&lt;/cell&gt;</span><br />
<span style="color: #000080;">&lt;cell&gt;</span><strong><em>&amp;nbsp;</em></strong><span style="color: #000080;">&lt;/cell&gt;</span><br />
<span style="color: #000080;">&lt;/row&gt;</span><br />
&#8230;<br />
<span style="color: #008080;">&lt;/table&gt;</span><br />
<span style="color: #000080;">&lt;pb/&gt;</span><br />
&#8230;</div>
<p>What I wanted to accomplish was group all this together in separate divs for HTML output (ok, I actually need to write each page to its own file, but this is pretty much just one more step).</p>
<p>I just could not find a way to group this info this way using XSLT 1 without wrapping each page within its own div structure. I didn&#8217;t really want to go back and do this, so I asked the TEI-L list. David Sewell pinged me back with some XQuery code that recursively recalls the document structure for a given node.</p>
<p>He also mentioned that it would be pretty easy to write an XSLT 2 transformation that groups these nodes together. I did a little bit of digging and came up with</p>
<div class="code"><span style="color: #000080;">&lt;xsl:template match=<span style="color: #0000ff;">&#8220;tei:div&#8221;</span>&gt;</span><br />
<span style="color: #000080;">&lt;xsl:for-each-group select=<span style="color: #0000ff;">&#8220;*&#8221;</span> group-ending-with<span style="color: #0000ff;">&#8220;tei:pb&#8221;</span>&gt;</span><br />
<span style="color: #000080;">&lt;div class=<span style="color: #0000ff;">&#8220;page&#8221;</span>&gt;</span><br />
<span style="color: #000080;">&lt;xsl:apply-templates select=<span style="color: #0000ff;">&#8220;current-group()&#8221;</span> /&gt;</span><br />
<span style="color: #000080;">&lt;/div&gt;</span><br />
<span style="color: #000080;">&lt;/xsl:for-each-group&gt;</span><br />
<span style="color: #000080;">&lt;/xsl:template&gt;</span></div>
<p>This transformed the pages to what I was wanting</p>
<div class="code"><span style="color: #000080;">&lt;div class=<span style="color: #0000ff;">&#8220;page&#8221;</span>&gt;</span><br />
<span style="color: #000080;"><span style="color: #800080;">&lt;img src=<span style="color: #0000ff;">&#8220;0023_12.png&#8221;</span> alt=<span style="color: #0000ff;">&#8220;Page 12&#8243;</span> /&gt;</span></span></p>
<p><span style="color: #000080;">&lt;h1 class=<span style="color: #0000ff;">&#8220;fw&#8221;</span>&gt;</span>Williamsburg,<span style="color: #0000ff;"> 1850</span>,<span style="color: #000080;">&lt;/h1&gt;</span></p>
<p><span style="color: #008080;">&lt;table&gt;</span><br />
<span style="color: #008080;">&lt;tr&gt;</span><br />
<span style="color: #008080;">&lt;td&gt;</span><br />
<span style="color: #000080;">&lt;span class=<span style="color: #0000ff;">&#8220;abbr&#8221;</span>&gt;</span>Oct<span style="color: #000080;">&lt;sup&gt;</span><span style="color: #000080;">&lt;u&gt;</span>r<span style="color: #000080;">&lt;/u&gt;</span><span style="color: #000080;">&lt;/sup&gt;</span><span style="color: #000080;">&lt;/span&gt;</span><span style="color: #000080;">&lt;span class=<span style="color: #0000ff;">&#8220;expan&#8221;</span>&gt;</span>October<span style="color: #000080;">&lt;/span&gt;</span> 3<span style="color: #000080;">&lt;sup&gt;</span>th<span style="color: #000080;">&lt;/sup&gt;</span> 1850<span style="color: #000080;">&lt;/date&gt;</span><br />
<span style="color: #008080;">&lt;/td&gt;</span><br />
<span style="color: #008080;">&lt;td&gt;</span><br />
<span style="color: #008000;">&lt;a href=<span style="color: #0000ff;">&#8220;javascript:getName(&#8216;griffss01&#8242;);&gt;</span>Doct<span style="color: #000080;">&lt;sup&gt;</span><span style="color: #000080;">&lt;u&gt;</span>r<span style="color: #000080;">&lt;/u&gt;</span><span style="color: #000080;">&lt;/sup&gt;</span> S S Griffin<span style="color: #008000;">&lt;/a&gt;</span><br />
<span style="color: #008080;">&lt;/td&gt;</span><br />
<span style="color: #008080;">&lt;td&gt;</span><strong><em>&amp;nbsp;</em></strong><span style="color: #008080;">&lt;/td&gt;</span><br />
<span style="color: #000080;">&lt;/row&gt;</span><br />
&#8230;<br />
<span style="color: #008080;">&lt;/table&gt;</span><br />
<span style="color: #000080;">&lt;/div&gt;</span></p>
<p><span style="color: #000080;">&lt;div class=&#8221;</span>page&#8221;&gt;</span><br />
&#8230;<br />
<span style="color: #000080;">&lt;/div&gt;</span></div>
<p>The XSLT processor for ColdFusion doesn&#8217;t support XSLT 2.0 (it&#8217;s still a draft spec). However, Saxon does (specifically Saxon 8). For more on doing XSLT transformations, see <a href="http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/11/21/XSLT-20-in-ColdFusion">XSLT 2.0 in ColdFusion</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2006/08/23/real-life-xslt-20-transformations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting XML from MSSQL Server</title>
		<link>http://www.liquidfoot.com/2006/08/21/getting-xml-from-mssql-server/</link>
		<comments>http://www.liquidfoot.com/2006/08/21/getting-xml-from-mssql-server/#comments</comments>
		<pubDate>Mon, 21 Aug 2006 18:49:57 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=210</guid>
		<description><![CDATA[I&#8217;ve been playing with all the AJAX stuff that&#8217;s been coming out lately. I suppose that like a lot of folks, I was creating a query, then having a generic function that created the XML in a proxy file for the JavaScript (Ray Camden has a really nice function for transforming a query to XML). [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with <a href="http://openrico.org/">all</a> <a href="http://swem.wm.edu/blogs/waynegraham/index.cfm/2006/scriptaculous">the</a> <a href="http://labs.adobe.com/technologies/spry/">AJAX</a> <a href="http://dojotoolkit.org/">stuff</a> <a href="http://developer.yahoo.com/yui/">that&#8217;s</a> <a href="http://code.google.com/webtoolkit/">been</a> <a href="http://mochikit.com/">coming</a> <a href="http://www.aflax.org/">out</a> <a href="http://jquery.com/">lately</a>. I suppose that like a lot of folks, I was creating a query, then having a generic function that created the XML in a proxy file for the JavaScript (<a href="http://ray.camdenfamily.com/index.cfm/2006/7/13/ToXML-Update">Ray Camden has a really nice function for transforming a query to XML</a>).</p>
<p>Last week I was doing some research to find a way to do some XML searching and stumbled upon the <a href="http://msdn2.microsoft.com/en-us/library/ms190922.aspx">FOR XML</a> statement. I knew that most RDBMSs were capable of dealing with XML record sets, but it&#8217;s been years since I&#8217;ve even looked at any of the XML stuff for MSSQL.</p>
<p>The FOR XML statement returns a query result and transforms rows into XML elements. There are three arguments that this can take:</p>
<ul>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms175140.aspx">RAW</a>: Transforms each row into an element with a generic identifier (&lt;row/&gt;) as the element tag.</li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms188273.aspx">AUTO</a>: Returns the results in a simple nested XML tree</li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms175140.aspx">EXPLICIT</a>: Allows you to define the XML tree returned</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2006/08/21/getting-xml-from-mssql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
