C# XSLT remove node
Could someone help me with this. I need in C# to remove node "xsl:variable" ,  as  you can see here are two xsl:template  nodes with child elements xsl:variable . In this  sample I need to remove it with C#.

Something like this:

    XmlDocument d = new XmlDocument();
    d.Load("MyFileName.Xml");
    XmlNode t = d.SelectSingleNode("/navigation/page[@id='1']");
    t.ParentNode.RemoveChild(t);
    d.Save();

But I cant get path of 'xsl:variable'  to  d.SelectSingleNode()  

Please help me ?

THIS IS XSLT:

    <xsl:template name="Aggregate:RealECBooleanToXMLBoolean">
    		<xsl:param name="RealECBoolean" select="/.."/>
    		<xsl:variable name="var1_result">
    			<xsl:value-of select="($RealECBoolean = 'Yes')"/>
    			<xsl:value-of select="($RealECBoolean = 'YES')"/>
    			<xsl:value-of select="($RealECBoolean = 'X')"/>
    		</xsl:variable>
    		<xsl:variable name="var2_resultof_any" select="boolean(translate(normalize-space($var1_result), 'false0 ', ''))"/>
    		<xsl:choose>
    			<xsl:when test="string((string((string($var2_resultof_any) != 'false')) != 'false')) != 'false'">
    				<xsl:value-of select="(string((string($var2_resultof_any) != 'false')) != 'false')"/>
    			</xsl:when>
    			<xsl:otherwise>
    				<xsl:value-of select="false()"/>
    			</xsl:otherwise>
    		</xsl:choose>
    	</xsl:template>
    	<xsl:template name="Aggregate:LookupRECodeName">
    		<xsl:param name="RECode" select="/.."/>
    		<xsl:call-template name="vmf:vmf1_inputtoresult">
    			<xsl:with-param name="input" select="$RECode"/>
    		</xsl:call-template>
    	</xsl:template>
C# XSLT remove node
===

Could someone help me with this. I need in C# to remove node "xsl:variable" ,  as  you can see here are two xsl:template  nodes with child elements xsl:variable . In this  sample I need to remove it with C#.

Something like this:

    XmlDocument d = new XmlDocument();
    d.Load("MyFileName.Xml");
    XmlNode t = d.SelectSingleNode("/navigation/page[@id='1']");
    t.ParentNode.RemoveChild(t);
    d.Save();

But I cant get path of 'xsl:variable'  to  d.SelectSingleNode()  

Please help me ?

THIS IS XSLT:

    <xsl:template name="Aggregate:RealECBooleanToXMLBoolean">
    		<xsl:param name="RealECBoolean" select="/.."/>
    		<xsl:variable name="var1_result">
    			<xsl:value-of select="($RealECBoolean = 'Yes')"/>
    			<xsl:value-of select="($RealECBoolean = 'YES')"/>
    			<xsl:value-of select="($RealECBoolean = 'X')"/>
    		</xsl:variable>
    		<xsl:variable name="var2_resultof_any" select="boolean(translate(normalize-space($var1_result), 'false0 ', ''))"/>
    		<xsl:choose>
    			<xsl:when test="string((string((string($var2_resultof_any) != 'false')) != 'false')) != 'false'">
    				<xsl:value-of select="(string((string($var2_resultof_any) != 'false')) != 'false')"/>
    			</xsl:when>
    			<xsl:otherwise>
    				<xsl:value-of select="false()"/>
    			</xsl:otherwise>
    		</xsl:choose>
    	</xsl:template>
    	<xsl:template name="Aggregate:LookupRECodeName">
    		<xsl:param name="RECode" select="/.."/>
    		<xsl:call-template name="vmf:vmf1_inputtoresult">
    			<xsl:with-param name="input" select="$RECode"/>
    		</xsl:call-template>
    	</xsl:template>