【发布时间】:2012-11-16 07:42:23
【问题描述】:
我正在使用 Python 元素树来解析 xml 文件
假设我有一个这样的 xml 文件..
<html>
<head>
<title>Example page</title>
</head>
<body>
<p>hello this is first paragraph </p>
<p> hello this is second paragraph</p>
</body>
</html>
有什么方法可以提取带有完整 p 标签的正文,如
desired= "<p>hello this is first paragraph </p> <p> hello this is second paragraph</p>"
【问题讨论】:
标签: python xml-parsing