extract data from xml files using batch

后端 未结 1 1236
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-29 12:16

I\'am looking for a batch script which looks trough hundreds of XML files and extracts certain values I need. The output file can be txt.

The XML files look all like thi

相关标签:
1条回答
  • 2021-01-29 13:11

    You can check xpath.bat

    for /f "tokens=* delims=" %%# in ('xpath "c:\my.xml" "//@testTime"') do set "testtime=%%#"
    
    for /f "tokens=* delims=" %%# in ('xpath "c:\my.xml" "//@shortNUM"') do set "shortNUM=%%#"
    
    echo %testtime% -- %shortNUM%
    
    0 讨论(0)
提交回复
热议问题