I'm writing a script that replaces and delete some commented lines but the problem is the .xml file got more than only one thing which is commented and I only have to uncomment one of these. It would be no problem if there's everything written on one line but it's not.
XML looks like this:
<!--
<session-config>
<anything>
</session-config>
-->
<!--
<something-else>
<session-timeout>120</session-timeout>
</something-else>
-->
So: I need to remove <!-- and -->
by the <session-config>
, </session-config>
but NOT by the <something-else>
, </something-else>
!! And if I use -replace "<!--", ""
it will delete the comment as well by <something else>
and this is not what I want.