<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TSQL on AdaTheDev Blog</title><link>https://www.adathedev.co.uk/tags/tsql/</link><description>Recent content in TSQL on AdaTheDev Blog</description><generator>Hugo -- gohugo.io</generator><managingEditor>adathedev@gmail.com (Adrian Hills)</managingEditor><webMaster>adathedev@gmail.com (Adrian Hills)</webMaster><lastBuildDate>Mon, 16 Jan 2012 10:36:00 +0000</lastBuildDate><atom:link href="https://www.adathedev.co.uk/tags/tsql/index.xml" rel="self" type="application/rss+xml"/><item><title>Excluding nodes from XML data before returning from SQL Server</title><link>https://www.adathedev.co.uk/2012/01/modifying-xml-data-before-returning.html</link><pubDate>Mon, 16 Jan 2012 10:36:00 +0000</pubDate><author>adathedev@gmail.com (Adrian Hills)</author><guid>https://www.adathedev.co.uk/2012/01/modifying-xml-data-before-returning.html</guid><description>This post follows on from a question I recently replied to, for how to exclude a specific node from an XML column value before returning it, using TSQL.
Example setup CREATE TABLE Example ( ID INTEGER IDENTITY(1,1) PRIMARY KEY, XmlField XML ) INSERT Example (XmlField) VALUES (&amp;#39;&amp;lt;Root&amp;gt;&amp;lt;ChildA&amp;gt;Value I want to see&amp;lt;/ChildA&amp;gt;&amp;lt;ChildB&amp;gt;Value I do not want to see&amp;lt;/ChildB&amp;gt;&amp;lt;/Root&amp;gt;&amp;#39;) So if you want to return the XML minus the ChildB node, how do you do it?</description></item></channel></rss>