Skip to content

Instantly share code, notes, and snippets.



Last active Apr 19, 2020
What would you like to do?
from lxml import etree
import io
import sys
TAGfile = open(sys.argv[1]+"/Testing/TAG", 'r') #(1)
dirname = TAGfile.readline().strip()
xslfile = open(sys.argv[2], 'r')
xslcontent =
xmldoc = etree.parse(sys.argv[1]+"/Testing/"+dirname+"/Test.xml") #(2)
xslt_root = etree.XML(xslcontent) #(3)
transform = etree.XSLT(xslt_root) #(4)
result_tree = transform(xmldoc) #(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment