You can use the advanced SET syntax. set "var = content".
This eludes special characters, but quotation marks are not part of the string.
echo off Setlocal EnableDelayedExpansion set "path1=<Workspace " set "name=name="RealTimeRiskUSD_UA"" set "path2=path="C:\workspace" IsAdmin="false" />" set "fullpath=%path1%%name%%path2%" echo !fullpath!
source share