【发布时间】:2015-11-08 19:47:28
【问题描述】:
我正在使用 minidom 解析一个 xbrl 文件。我使用 getElementsByTagName
找到以下内容<table xmlns="http://www.w3.org/1999/xhtml" style="border-right: 0px; border-top: 0px; border-left: 0px; width: 650px; border-bottom: 0px; border-collapse: collapse" width="100%"><tr><td colspan="1">Independent auditor's report on the financial statements</td></tr></table><br><table xmlns="http://www.w3.org/1999/xhtml" style="border-right: 0px; border-top: 0px; border-left: 0px; width: 650px; border-bottom: 0px; border-collapse: collapse" width="100%"><tr><td colspan="1">We have audited the financial statements of KPMG Statsautoriseret Revisionspartnerselskab for the financial year 11 December 2013 – 31 December 2014. The financial statements comprise income statement, balance sheet, statement of changes in equity, cash flow statement accounting policies and notes. The financial statements are prepared in accordance with the Danish Financial Statements Act.</td></tr></table>
现在我只想从中获取文本,我应该如何进行?从现在开始我是否应该选择beautifulsoup?
整个文件可以在here找到,我正在查看的字段是<arr:AuditorsReportOnFinancialStatements
【问题讨论】:
标签: python xml python-2.7 xml-parsing html-parsing