Visualizing XML children in Python using ElementTree? -
given 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>
i update 'price' tags in hierarchical manner , print:
anthology price: 110, book 1 price: 50, book 2 price: 60
or in pseudo speak, search index item , have 'price' tag reflect sum of children 'price' tags.
any suggestions how attack using elementtree?
Comments
Post a Comment