Skip to content

Commit 6018922

Browse files
authored
Update 2024-12-20-18-54-53.gh-issue-128136.tgbvWt.rst
1 parent b90b81e commit 6018922

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
New parameter added to the write function that allows you to customize the xml declaration, which was previously hard-coded.
22

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}'?>
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}'?>``
44

55
When specifying the parameter, the following options are available.
66
E.g.:
7-
- tee.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="{version}" encoding="{encoding}"?>''')
87

9-
- tee.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="1.1" encoding="{encoding}"?>''')
8+
- tree.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="{version}" encoding="{encoding}"?>''')
9+
- tree.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="1.1" encoding="{encoding}"?>''')
10+
- tree.write(file, encoding="utf-8", xml_declaration=True, xml_declaration_definition='''<?xml version="1.1"?>''')
1011

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.
12+
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)