Pure Python XSLT library

前端 未结 5 1261
暖寄归人
暖寄归人 2021-02-07 03:14

Is there an XSLT library that is pure Python?

Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support.

I re

5条回答
  •  悲哀的现实
    2021-02-07 03:46

    If you only need basic support, and your XML isn't too crazy, consider removing the XSLT element from the equation and just using a DOM/SAX parser.

    Here's some info from the PythonInfo Wiki:

    [DOM] sucks up an entire XML file, holds it in memory, and lets you work with it. Sax, on the other hand, emits events as it goes step by step through the file.

    What do you think?

提交回复
热议问题