Answer by Stephan for Extract Line of Text Between 2 Words in XML file
Batch isn't the right choice for processing XML files, but if the formatting is known, it's possible:for /f "tokens=3 delims=<>" %%a in ('find "<ServerPath>""C:\Test\file.xml"') do set...
View ArticleAnswer by npocmaka for Extract Line of Text Between 2 Words in XML file
try with xpath.bat (if this is a valid xml):call xpath.bat test.xml "//ServerPath"orfor /f "tokens=* delims=" %%a in ('xpath.bat test.xml "//ServerPath"') do set "server_path=%%~a"echo %server_path%
View ArticleExtract Line of Text Between 2 Words in XML file
I'm trying to write a simple batch to extract some specific text from a xml file.The file is always in the same place and the text I need to extract is a UNC path, so will always vary, but will always...
View Article