i have an xml file on which i have to do modification basing on some rules and i want to know can we do that in the batch script. suppose the following is the sample of xml file
@echo off
::get the line before desired tag
for /f "tokens=1 delims=:" %%L in ('findstr /n "" some.xml') do set /a line=%%L-1
::create empty file
break>"%temp%\empty"
::get first <%line%> lines of the file
fc "%temp%\empty" "some.xml" /lb %line% /t |more +4 | findstr /B /E /V "*****" >temp.xml
:: add additional content
echo ^
- 热议问题