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
from StringIO import StringIO | |
from lxml import etree | |
import os | |
import sys | |
if (len(sys.argv) > 1): | |
srcFile = os.path.abspath(sys.argv[1]) | |
if (not os.path.exists(srcFile)): | |
print "File '" + srcFile + "' not found." | |
sys.exit(0) |
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
from StringIO import StringIO | |
from lxml import etree | |
xslt_root = etree.XML('''\ | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<foo><xsl:value-of select="/a/b/text()" /></foo> | |
</xsl:template> | |
</xsl:stylesheet>''') |