About Parsing Nodes with Namespaces in XML
If you use defusedxml
(or lxml
) to parse RSS or other XML documents, you need to be able to read values from namespaced nodes, for example <content:encoded>
. You can do that by passing a dictionary with your namespaces to the find()
or findall()
methods, like this:
1 2 3 4 5 6 7 8 9 10 |
|
XML namespaces are usually declared in the root node of XML document with xmlns
prefix, for example:
1 2 3 4 5 6 7 8 9 10 11 |
|
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You