我正在从第三方应用程序中提取一个 xml 文件,如下所示
<round round_id="14208" name="5th Round" start_date="2013-09-06" end_date="2013-09-10" type="cup" groups="0" has_outgroup_matches="no" last_updated="2011-04-05 14:15:02">
--Some Data with more elements
</round>
<round round_id="14208" name="5th Round" start_date="2013-09-06" end_date="2013-09-10" type="cup" groups="0" has_outgroup_matches="no" last_updated="2011-04-05 14:15:02">
--Some Data with more elements
</round>
我的问题是有时这个标签带有像这样的自关闭标签
<round round_id="14208" name="5th Round" start_date="2013-09-06" end_date="2013-09-10" type="cup" groups="0" has_outgroup_matches="no" last_updated="2011-04-05 14:15:02"/>
我想检查自闭标签并删除元素。
请帮帮我。谢谢