Konwersja pliku xml do csv w skrypcie powłoki?
Próbuję przekonwertować plik xml do pliku csv. Mam wejściowy plik XML taki jak ten:
<Row>
<Cell>
<Data Type="String" >START</Data>
</Cell>
<Cell>
<Data Type="DateTime" >2013-01-15T21:30:42</Data>
</Cell>
<Cell>
<Data Type="String" ></Data>
</Cell>
<Cell>
<Data Type="String" >Start 'suite8'</Data>
</Cell>
<Cell>
<Data Type="String" >Test 'suite8' started</Data>
</Cell>
<Cell>
<Data Type="String" ></Data>
</Cell>
</Row>
<Row/>
<Row>
<Cell>
<Data Type="String" >START_TEST_CASE</Data>
</Cell>
<Cell>
<Data Type="DateTime" >2013-01-15T21:30:42</Data>
</Cell>
<Cell>
<Data Type="String" ></Data>
</Cell>
<Cell>
<Data Type="String" >Start 'case1'</Data>
</Cell>
<Cell>
<Data Type="String" >Test Case 'case1' started</Data>
</Cell>
<Cell>
<Data Type="String" >case1</Data>
</Cell>
</Row>
Interesują mnie bity między tagami<Data Type="String" >
i</Data>
. Również nowa linia powinna zostać uruchomiona, gdy tag<Row>
pojawia się.
Plik wyjściowy csv, który chcę, powinien wyglądać następująco:
START,2013-01-15T21:30:42,,Test 'suite8' started
START_TEST_CASE,2013-01-15T21:30:42,,Start 'case1',Test Case 'case1' started,case1
Mam nadzieję, że to jest wystarczająco jasne, każda pomoc jest bardzo mile widziana :) Dzięki!