给定XML:
<Anthology>
<Price></Price>
<Book>
<Price></Price>
<Leaflet>
<Title>War</Title>
<Price>20</Price>
</Leaflet>
<Leaflet>
<Title>Peace</Title>
<Price>30</Price>
</Leaflet>
</Book>
<Book>
<Price>60</Price>
</Book>
</Anthology>
我想以分层方式更新“价格”标签并打印:
Anthology price: 110, Book 1 price: 50, Book 2 price: 60
或者在pseudo中,我想搜索一个索引项,并让它的'price'标签反映所有子级'price'标签的总和。在
有什么建议可以用ElementTree来攻击它?在
目前没有回答
相关问题 更多 >
编程相关推荐