xmlstarlet xslt transform failing to remove nodes

adamsorange

New Member
I'm attempting to use xmlstarlet to work on a large group of .Net project files, however attempting this simple transform using xsl to remove \[code\]ProductVersion\[/code\] isn't working. I have tried \[code\]//ProductVersion\[/code\], could the namespace in this instance be causing issues?run.cmd\[code\]SET ProjFile=test.vbprojSET TempFile=%TEMP%\temp.projxml tr clean.xsl %ProjFile% > %TempFile%move /Y %TempFile% %ProjFile%\[/code\]clean.xsl\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match='@*|node()'> <xsl:copy> <xsl:apply-templates select='@*|node()'/> </xsl:copy> </xsl:template> <xsl:template match="ProductVersion"/></xsl:stylesheet>\[/code\]test.vbproj\[code\]<?xml version="1.0" encoding="UTF-8"?><Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="4.0"> <PropertyGroup> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> </PropertyGroup></Project>\[/code\]
 
Back
Top