太字、段落、表などの html コンテンツを含む xml ファイルが 1 つあります。テーブルを除くすべての html タグを解析するシェル スクリプトを作成しました。XML (R パッケージ) を使用してデータを解析しています。
<Root>
<Title> This is dummy xml file </Title>
<Content> This table summarises data in BMC format.
<div class="abctable">
<table border="1" cellspacing="0" cellpadding="0" width="100%" class="coder">
<tbody>
<tr>
<th width="50%">ABC</th>
<th width="50%">Weight status</th>
</tr>
<tr>
<td>are 18.5</td>
<td>arew</td>
</tr>
<tr>
<td>18.5 &mdash; 24.9</td>
<td>rweq</td>
</tr>
<tr>
<td>25.0 &mdash; 29.9</td>
<td>qewrte</td>
</tr>
<tr>
<td>30.0 and hwerqer</td>
<td>rwqe</td>
</tr>
<tr>
<td>40.0 rweq rweq</td>
<td>rqwe reqw</td>
</tr>
</tbody>
</table>
</div>
</Content>
<Section>blah blah blah</Section>
</Root>
xml に存在するこのテーブルのコンテンツを解析する方法は?