Quantcast
Channel: Extract Line of Text Between 2 Words in XML file - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

Extract 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
Browsing latest articles
Browse All 3 View Live


Latest Images