Jan-25-2020, 02:05 PM
I'm porting a web application from Perl to Python3 (using mod_wsgi and Flask). The application uses XML extensively.
I've found that I need to use the Python module "libxml2" for some tasks and "lxml" for other tasks.
The reason is that "lxml" seems to lack the function" "getLang()" that is a must-have for parts of my application, while "libxml2" seems currently not able to do transformations with XSLT. So for the parts that need "getLang()" I use "libxml2", and for the XSLT parts I use "lxml". It works, but it's a bit annoying having to use two different XML modules.
Have I missed something? Any advice will be most welcome.
I know that "lxml" uses the library "libxml2". I'm talking about the Python module "libxml2" that of course also uses the same library, but with different bindings.
I've found that I need to use the Python module "libxml2" for some tasks and "lxml" for other tasks.
The reason is that "lxml" seems to lack the function" "getLang()" that is a must-have for parts of my application, while "libxml2" seems currently not able to do transformations with XSLT. So for the parts that need "getLang()" I use "libxml2", and for the XSLT parts I use "lxml". It works, but it's a bit annoying having to use two different XML modules.
Have I missed something? Any advice will be most welcome.
I know that "lxml" uses the library "libxml2". I'm talking about the Python module "libxml2" that of course also uses the same library, but with different bindings.