Díky,

to pomohlo. Expandovat jmený prostor ‚dc’ na 
'{http://purl.org/dc/elements/1.1/}’ jsem zkoušel, ale chybělo mi .// O tom 
jsem se nikde nedočetl.

On 13.5.2011, at 0:22, Michal Molhanec wrote:

> 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

_______________________________________________
Python mailing list
[email protected]
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem