本帖最后由 zhengwei007 于 2024-3-27 23:38 编辑
我有若干个XML文件,内容如下:- <?xml version="1.0" encoding="UTF-8"?>
- <list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/multisell.xsd">
- <npcs>
- <npc>32615</npc> <!-- Ishuma (Maestro) -->
- </npcs>
- <item>
- <!-- Vesper Cutter -->
- <ingredient count="1" id="13457" />
- <!-- Sirra's Blade -->
- <ingredient count="1" id="8678" />
- <!-- Dualsword Craft Stamp -->
- <ingredient count="1" id="5126" />
- <!-- Adena -->
- <ingredient count="7168000" id="57" />
- <!-- Vesper Dual Sword -->
- <production count="1" id="52" />
- </item>
- <item>
- <!-- Stormbringer -->
- <ingredient count="1" id="72" />
- <!-- Caliburs -->
- <ingredient count="1" id="75" />
- <!-- Dualsword Craft Stamp -->
- <ingredient count="1" id="5126" />
- <!-- Crystal (C-Grade) -->
- <ingredient count="183" id="1459" />
- <!-- Adena -->
- <ingredient count="548100" id="57" />
- <!-- Stormbringer*Caliburs -->
- <production count="1" id="2566" />
- </item>
复制代码 希望通过批处理对以上所有文件内容输出到一个CSV文件,标题我写,格式如下:- ingredientID count ingredientID count ingredientID count ingredientID count ingredientID count productionID count
- 13457 1 8678 1 5126 1 57 7168000 52 1
- 72 1 75 1 5126 1 1459 183 57 548100 2566 1
复制代码 以上就是最终格式,谢谢! |