在python 2.6中,我这样做是为了实现xsl转换
import libxml2
import libxslt
...
styledoc = libxml2.parseFile(my_xslt_file)
style = libxslt.parseStylesheetDoc(styledoc)
doc = libxml2.parseDoc(siri_response_data)
result = style.applyStylesheet(doc, None)
...
Run Code Online (Sandbox Code Playgroud)
Python 3.2中的等价物是什么?
我问,因为似乎lnxml和libxslt在python3.2中不可用.我听说过lxml - 这是libxml2 + libxslt的直接等价物还是有不同的调用模式(需要重写代码)?