回复 1# zhengwei007
代码保存为bat文件,跟xml放一起,运行后会生成与xml同名的csv文件。- @echo off &setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /b /a-d *.xml') do (
- (set "v="&echo classID, skillName, skillId, skillLevel, getLevel, levelUpSp
- for /f tokens^=1-10^ delims^=^ ^=^<^" %%a in (' findstr "=" "%%i" ') do (
- if /i "%%a"=="skillTree type" (set "v1=%%d")
- if /i "%%a"=="skill skillName" (
- set "v=!v1!, %%b, %%d, %%f, %%h"
- if /i "%%j" neq "true" (echo !v!, %%j) else echo !v!
- )
- ))>%%~ni.csv
- )
- pause
复制代码
|