import xml.etree.ElementTree as ET
tree = ET.parse('content.opf')
print tree.findtext('.//{http://purl.org/dc/elements/1.1/}title')
-------------------
.// zpusobi, ze se bude hledat do hloubky
{http://purl.org/dc/elements/1.1/} je jmenny prostor (nejake 'dc' je jen
bezvyznamny prefix)
Jine knihovny, treba: http://lxml.de/
_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python