update xml file with batch

UnamemMymmeme

New Member
[*]I have been searching for an hour with no luck[*]My boss wants it to be a batch fileI have a xml file that contains the following.\[code\] <?xml version="1.0"?> <profiledoc default="*** Last Run ***"> <profile name="*** Last Run ***" > <workingdir>c:\proj</workingdir> <somestuff>none</somestuff> <smpnumprocs>4</smpnumprocs> <otherstuff></otherstuff> <llama>FLUFFY</llama> <language>en-us</language> <customexe></customexe> <addlparams></addlparams> <graphicsdevice>win32</graphicsdevice> </profile> </profiledoc>\[/code\]We want to set \[code\]<smpnumprocs>4</smpnumprocs>\[/code\] (which is the number of processors used) to 2therefore, the line should look like this \[code\]<smpnumprocs>2</smpnumprocs>\[/code\]I figured out how to get to the value I want with this\[code\]FOR /f "tokens=3 delims=>< " %%a IN ('TYPE %LOCAL_FILE% ^| FIND "<smpnumprocs>"') DO SET NUM_PROCS=%%a\[/code\]Now how do I change the value?
 
Back
Top