Matěj. Good afternoon.
You are correct. I was utilizing the built-in xml module.
Now, I realize my mistake.
This list is relevant to me, and from now on, I will post about
concerns of lxml, that are not of the built-in module xml.
Thank you,
Schimon
On Thu, 19 Jun 2025 09:03:31 +0200
Matěj Cep
On Sat Jun 14, 2025 at 8:34 PM CEST, Schimon Jehudah via lxml - The Python XML
Toolkit wrote:
> 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
As somebody suggest
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
Just configure the output encoding explicitly or force the XML declaration
to be written.
___
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3/lists/lxml.
Greetings, Stefan!
Thank you for your respond. I have added comments further.
On Wed, 15 Jan 2025 08:49:48 +0100
Stefan Behnel via lxml - The Python XML Toolkit wrote:
> Schimon Jehudah via lxml - The Python XML Toolkit schrieb am 12.01.25
> um 08:53:
> > On Fri, 10 Jan 2025 17:28:00 +0100
> >
Schimon Jehudah via lxml - The Python XML Toolkit schrieb am 12.01.25 um 08:53:
On Fri, 10 Jan 2025 17:28:00 +0100
jholg--- via lxml - The Python XML Toolkit wrote:
>>> from lxml import etree
>>> elem = etree.fromstring('')
>>> tree = elem.getroottree()
>>> tree.getroot().addprevious(etree.Pro
Greetings, Holger!
Thank you for your instructions and references.
Please. Read further messages.
On Fri, 10 Jan 2025 17:28:00 +0100
jholg--- via lxml - The Python XML Toolkit wrote:
> Hi Schimon,
>
> > I would want to know whether there is a function to append XSLT
> > stylesheet to XML file
Hi Schimon,
> I would want to know whether there is a function to append XSLT
> stylesheet to XML files.
>
> I have resorted to converting XML data to string, in order to append a
> reference to an XSLT styleshett.
For the processing instruction () itself I think you're
looking for s.th. like
>>