Last active
October 18, 2019 11:39
-
-
Save pavelpy/5887ee55f959811ac8efb56b1222ae72 to your computer and use it in GitHub Desktop.
Transform an XML file using XSLT in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lxml.etree as ET | |
dom = ET.parse(xml_filename) | |
xslt = ET.parse(xsl_filename) | |
transform = ET.XSLT(xslt) | |
newdom = transform(dom) | |
print(str(newdom)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment