21 ms·
We wrote a similar utility for our ORM-for-SaaS library some time ago, using lxml if available and falling back to ElementTree: https://github.com/ducksboard/l
by wulczer 13y ago
We wrote a similar utility for our ORM-for-SaaS library some time ago, using lxml if available and falling back to ElementTree:
https://github.com/ducksboard/libsaas/blob/master/libsaas/xml.py https://github.com/ducksboard/libsaas/blob/master/libsaas/xm...
Bear in mind that both approaches are lossy - trying to support every XML quirk would quickly lead to reimplementing the libxml wheel...