次の構造の xml ファイルがあります。
<a>
<b attribute="54" name="Bob" ... >
<c name="Foo" stuff="89" attr="First line
Second line" ... />
<c name="Bar" stuff="23" attr="Blahs" ... />
...
</b>
...
</a>
このデータを次のような csv ファイルで取得したいと思います。
b_attribute, b_name, ... , c1_name, c1_stuff, c1_attr ... , c2_name, c2_stuff, c2_attr ...
"54", "Bob", ..., "Foo", "89", "First line
Second line", ..., "Bar", "23", "Blahs", ...
一部のタグの値には、html のカンマと引用符が含まれる場合があります。