Filter xml in .Net with param <p>I am trying to filter an xml file in a .Net application I am developing. Some sample xml below, obviously not the proper xml, but near enough :-)</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt; &lt;Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;Row A1="1" A2="AMS"&gt; &lt;Name&gt;Ashley&lt;/Name&gt; &lt;Team&gt;Team B&lt;/Team&gt; &lt;Date&gt;3/25/2012&lt;/Date&gt; &lt;Value&gt;511681.15&lt;/Value&gt; &lt;/Row&gt; &lt;Row A1="2" A2="AMS"&gt; &lt;Name&gt;Kylie&lt;/Name&gt; &lt;Team&gt;Team A&lt;/Team&gt; &lt;Date&gt;9/28/2010&lt;/Date&gt; &lt;Value&gt;408438.47&lt;/Value&gt; &lt;/Row&gt; &lt;Row A1="3" A2="AMS"&gt; &lt;Name&gt;Gianna&lt;/Name&gt; &lt;Team&gt;Team B&lt;/Team&gt; &lt;Date&gt;40004&lt;/Date&gt; &lt;Value&gt;109709.22&lt;/Value&gt; &lt;/Row&gt; &lt;Row A1="4" A2="AMS"&gt; &lt;Name&gt;Chase&lt;/Name&gt; &lt;Team&gt;Team F&lt;/Team&gt; &lt;Date&gt;40152&lt;/Date&gt; &lt;Value&gt;279018.79&lt;/Value&gt; &lt;/Row&gt; </code></pre> <p></p> <p>The stylesheet has a param that is set by XsltArgumentList in the application. The param is passed into the stylesheet, but does not filter the xml. I have tried using the ms node-set and exsl node-set but only get the top level root returned. Stylesheet below:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl" xmlns:msxsl="urn:schemas-microsoft-com:xslt"&gt; &lt;xsl:output method="xml" indent="yes" encoding="UTF-8" /&gt; &lt;xsl:decimal-format name="NN" NaN="0" /&gt; &lt;xsl:param name="Filter" /&gt; &lt;xsl:template match="/"&gt; &lt;Root&gt; &lt;xsl:for-each select="exsl:node-set($Filter)"&gt; &lt;Row&gt; &lt;xsl:attribute name="A1"&gt; &lt;xsl:value-of select="@A1" /&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="A2"&gt; &lt;xsl:value-of select="@A2" /&gt; &lt;/xsl:attribute&gt; &lt;Team&gt; &lt;xsl:value-of select="Team"/&gt; &lt;/Team&gt; &lt;/Row&gt; &lt;/xsl:for-each&gt; &lt;/Root&gt; &lt;/xsl:template&gt; </code></pre> <p></p> <p>The filter i am trying to pass could be using any of the combination of the xml elements. The filter is am currently attempting is below</p> <pre><code>&lt;xsl:param name="Filter" select="//Row[Team='Team A']" /&gt; </code></pre> <p>But this is just returns</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;Root&gt; &lt;Row A1="" A2=""&gt; &lt;Team&gt;&lt;/Team&gt; &lt;/Row&gt; &lt;/Root&gt; </code></pre> <p>Any help or pointers would be appreciated!</p> <p>Thanks</p>