Greetings.
Alternatively, it would probably be good to add a new keyword argument
to function write() to xml.etree.ElementTree.
def write(self, file_or_filename,
encoding=None,
xml_declaration=None,
default_namespace=None,
method=None, *
Greetings.
I want to append instructions for XSLT without converting an XML object
to string.
Is there a solution for doing so, yet?
This code:
import xml.etree.ElementTree as ET
e_feed = ET.Element("feed")
e_feed.set("xmlns", "http://www.w3.org/2005/Atom";)
xslt_reference = ET.ProcessingInstr
Greetings.
This code:
import xml.etree.ElementTree as ET
e_feed = ET.Element("feed")
e_feed.set("xmlns", "http://www.w3.org/2005/Atom";)
xslt_reference = ET.ProcessingInstruction(
"xml-stylesheet",
"type=\"text/xml\" href=\"stylesheet.xsl\"")
e_feed.insert(0, xslt_reference)
Would yield