lxml或exml是否有导出XML中所有xpath的函数?你知道吗
XML示例:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>
<content>Don't forget me this weekend!</content>
</body>
</note>
XPath结果:
\\note
\\note\to
\\note\from
\\note\heading
\\note\body
\\note\body\content
Tags:
必须遍历树并在每个节点上调用getpath:
输出:
相关问题 更多 >
编程相关推荐