I am parsing a XML file like below:
It works, if you use the right tokens and delimiters:
@echo off&setlocal for /F tokens^=2^,3^,5delims^=^<^"^= %%a in (connection.config) do ( if "%%a" equ "connection name" echo(%%b %%c )
Output is:
name1 connection1 name2 connection2