用python libxml libxslt实现xml操作,最好能生成html文件,但是只要解决了xslt的问题就不难。

stylesheetArgs = {} # optional transform args
styleDoc = libxml2.parseDoc(docText) #
style = libxslt.parseStylesheetDoc(styleDoc)

doc = libxml2.parseDoc(srcXML) #
result = style.applyStylesheet(doc,stylesheetArgs)
res = style.saveResultToString(result)
style.freeStylesheet()
doc.freeDoc()
result.freeDoc()
return res