
Martijn Faassen writes:
That's because that isn't supposed to work -- the ElementTree API works solely with Clarke notation for namespaces, not with namespace prefixes.
Hmm. I'm guessing that there's no chance of it being introduced, either to the ElementTree API part of lxml, or as an additional part? Not that it's of great importance, it's just I'd like to be able to use one method consistently, and that's the method used in xpath() - which I use more frequently than the other means of navigating through a tree.
I'm not sure *what* we should expect in this case though, as how would one spell 'foo is in no namespace' in XML? I guess in that case the default namespace could be removed or changed to a namespace prefix that's autogenerated... Anyone have any ideas?
Your suggestion is what I would do, but I'm no expert. Jamie -- Artefact Publishing: http://www.artefact.org.nz/ GnuPG Public Key: http://www.artefact.org.nz/people/jamie.html