Skip to content

Commit b90b81e

Browse files
📜🤖 Added by blurb_it.
1 parent 82eee7b commit b90b81e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
New parameter added to the write function that allows you to customize the xml declaration, which was previously hard-coded.
2+
3+
The standard functionality is retained; if you don't specify the xml_declaration_definition parameter, the previous standard declaration is used. "<?xml version='1.0' encoding='{encoding}'?>
4+
5+
When specifying the parameter, the following options are available.
6+
E.g.:
7+
- tee.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="{version}" encoding="{encoding}"?>''')
8+
9+
- tee.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="1.1" encoding="{encoding}"?>''')
10+
11+
- tee.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="1.1"?>''')
12+
13+
The placeholders {version} and {encoding} are replaced, version is always 1.0 and enconding depends on the code as before.

0 commit comments

Comments
 (0)