codecompl...@free.fr schrieb am 04.09.21 um 02:32:
I strip the namespace because 1) I'm not clear about what namespaces are for,
They define the meaning of a tag. A tag name like "p" can mean anything, whereas "{http://www.w3.org/1999/xhtml}p" is definitely, specifically and explicitly an (X)HTML text paragraph tag.
https://lxml.de/tutorial.html#namespaces
2) they make it harder to search, and
No, not really. Just use the qualified name ("{uri}tagname") instead of the plain name ("tagname").
3) I'm dealing with very simple XML files so it doesn't look like it makes a difference if I strip the ns from the source file.
Fair enough. Stefan _______________________________________________ lxml - The Python XML Toolkit mailing list -- lxml@python.org To unsubscribe send an email to lxml-le...@python.org https://mail.python.org/mailman3/lists/lxml.python.org/ Member address: arch...@mail-archive.com