I am new to windows batch programming.
I have the below XML file
<itp:params>
<!--1 or more repetitions:-->
<itp:param name="persid">PERSID__</itp:param>
<itp:param name="attmnt">ATTMNTID__</itp:param>
</itp:params>
Now I have to replace the parameter PERSID__ & ATTMNTID__ using batch file.
I am able to update the PERSID__ using the following code
set _ATTMNTID=%1
set _PERSID=%2
setlocal DisableDelayedExpansion
set "search=PERSID__"
set "replace=%_PERSID%"
for /F "delims=" %%a in (%_XML_TPL%) DO (
set line=%%a
setlocal EnableDelayedExpansion
>> %_TEMP_FILE% echo(!line:%search%=%replace%!
endlocal
)
But struggling to update the second param ATTMNTID__.