Parse XML file for attribute from batch file

后端 未结 3 946
傲寒
傲寒 2021-01-13 03:05

I am parsing a XML file like below:




   
      
                 


        
3条回答
  •  借酒劲吻你
    2021-01-13 03:09

    @ECHO OFF
    SETLOCAL
    SET "name=name1"
    SET "connection="
    SET "type="
    
    for /F "tokens=5,7delims==/ " %%a in (
     'findstr /c:"

    Finding the data line which contains the literal string "\" escapes ") then set connection to the 5th (and type for good measure) from the seventh token of the data line

            
    

    using =, / and [space] as delimiters.

提交回复
热议问题