Parse XML file with windows batch

后端 未结 7 1364
感动是毒
感动是毒 2020-12-01 21:26

How can I extract an STRING like \"US_NY\" between the tags from a XML file? I tried it with FINDSTR, but the line breaks are

7条回答
  •  忘掉有多难
    2020-12-01 22:08

    sed for Windows

    sed -n "//{n;p}" file.xml
    

    in a batch file:

    for /f %%a in ('sed -n "//{n;p}" file.xml') do set "location=%%a"
    echo(%location%
    

提交回复
热议问题