I have an .xslt file with just a few variables in it. I need to update two of them using Powershell. The file looks like:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="VarA" select="this data stays the same" />
<xsl:variable name="VarB" select="this data also stays the same" />
<xsl:variable name="ChangeMe_1" select="data to be changed" />
<xsl:variable name="ChangeMe_2" select="more data to be changed" />
</xsl:stylesheet>
I need to update the select values in the variables named ChangeMe_1 and ChangeMe_2 to parameters passed into the Powershell script. I'm a total newbie at Powershell, and I'm finding lots of resources on parsing XML files, but this xslt is just different enough that it's confounding me.
Additionally, this needs to be done in every .xslt file with the same name in a hierarchy of folders, so if anyone can point me in the right direction for that I'd very much appreciate it.