I'm trying to convert a xml file to a csv file. I have an input xml file like this:
<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>
I'm interested in the bits between the tags <Data Type="String" >
and </Data>
. Also, a new line should be started when the tag <Row>
appears.
The output csv file I want should look like this:
START,2013-01-15T21:30:42,,Test 'suite8' started
START_TEST_CASE,2013-01-15T21:30:42,,Start 'case1',Test Case 'case1' started,case1
I hope this is clear enough, any help is greatly appreciated :) Thanks!