我搜索了以下问题,但找不到合适的解决方案。
我有单独的列表:
<list>
<p class="1">1. Voice of the Customer/Business/Process /Employee</p>
<p class="1">2. Value add trefwoord 4:</p>
<p class="2">a. Waste</p>
<p class="2">b. Process flow:</p>
<p class="3">- Process flow</p>
<p class="1">3. SIPOC</p>
<p class="1">4. Takt time</p>
</list>
我想在多个列表中转换此xml,其层次结构如下:
<list>
<listitem><p class="1">1. Voice of the Customer/Business/Process /Employee</p></listitem>
<listitem><p class="1">2. Value add trefwoord 4:</p>
<list>
<listitem><p class="2">a. Waste</p></listitem>
<listitem><p class="2">b. Process flow:</p>
<list>
<listitem><p class="3">- Process flow</p></listitem>
</list>
</listitem>
</list>
</listitem>
<listitem><p class="1">3. SIPOC</p></listitem>
<listitem><p class="1">4. Takt time</p></listitem>
</list>
我尝试了几个分组代码,但我没有把它弄好。请有人帮助我。有没有办法做到这一点?