Python ElementTree Attribute with \"\"
So I'm trying to make some xml using ElementTree in Python but I can't get the Attribute to put backslashes before the quotes i.e.
What I get is:
But what I want is:
I've had a look at the elementree code but can't work out how to make this work and the documentation is a bit dire.
So I'm trying to make some xml using ElementTree in Python but I can't get the Attribute to put backslashes before the quotes i.e.
What I get is:
Code:
<Foo Bar="text">
But what I want is:
Code:
<Foo Bar=\"text\">
I've had a look at the elementree code but can't work out how to make this work and the documentation is a bit dire.
Last edited: