Parse XML file with windows batch

You should use XML.EXE within batch to read an XML file. For more details go to http://xmlstar.sourceforge.net/

Batch File:

@echo off
for /f %%i in ('XML.EXE sel -t -v "//LOCATION" CP.xml') do set var=%%i
echo LOCATION is %var%

output:

LOCATION is US_NY

Leave a Comment