I have a valid XHTML file. When I do
import xml.etree.ElementTree as ET
print ET._namespace_map
it lists:
'http://www.w3.org/1999/xhtml': 'html'
When I do:
root.find('{http://www.w3.org/1999/xhtml}head')
it finds:
<Element '{http://www.w3.org/1999/xhtml}head' at 0x104647168>
But when I do:
root.find('html:head')
it complains:
SyntaxError: prefix 'html' not found in prefix map
Is it possible to find an name-spaced-element with find
using the syntax ns:element
?