Apr-18-2018, 12:57 PM
Hello everyone,
I'm new to playing with XML files
I'm trying to render XML file with XSL stylesheet file via code below in python3:
It should be like:
Can anyone help to show where the problem is?
Here are the files:
xml_file.xml
xsl_stylesheet.xsl
I'm new to playing with XML files
I'm trying to render XML file with XSL stylesheet file via code below in python3:
from lxml.etree as ET def render_xml(): xml_content = ET.parse(open('xml_file.xml', 'r')) xml_stylesheet = ET.parse(open('xsl_stylesheet.xsl', 'r')) transform = ET.XSLT(xml_stylesheet) rendered_xml = transform(xml_content) return HttpResponse(rendered_xml)But it's rendered partially as image below:
It should be like:
Can anyone help to show where the problem is?
Here are the files:
xml_file.xml
xsl_stylesheet.xsl