1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-30 07:50:43 +00:00
community.general/tests/integration/targets/xml/results
patchback[bot] b4e3d32e5a
[PR #12148/5004c9f7 backport][stable-12] xml: preserve DOCTYPE declaration when writing XML files (#12248)
xml: preserve DOCTYPE declaration when writing XML files (#12148)

* fix(xml): preserve DOCTYPE declaration when writing XML files

Pass `doctype=tree.docinfo.doctype` to all `ElementTree.write()` calls
so lxml does not silently drop the DOCTYPE on serialization. Also replace
`etree.tostring()` with BytesIO+write() in the diff and xmlstring paths
for consistency.

Fixes #2762



* test(xml): add integration test for DOCTYPE preservation



* feat(changelog): add fragment for xml DOCTYPE fix (#12148)



---------


(cherry picked from commit 5004c9f70f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:33:13 +02:00
..
test-add-children-elements-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-elements-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-elements.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-elements.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-from-groupvars.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-from-groupvars.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-insertafter.xml
test-add-children-insertafter.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-insertbefore.xml
test-add-children-insertbefore.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-with-attributes-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-with-attributes-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-children-with-attributes.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-children-with-attributes.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-element-implicitly.xml
test-add-element-implicitly.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-add-namespaced-children-elements.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-add-namespaced-children-elements.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-preserve-doctype.xml [PR #12148/5004c9f7 backport][stable-12] xml: preserve DOCTYPE declaration when writing XML files (#12248) 2026-06-13 17:33:13 +02:00
test-preserve-doctype.xml.license [PR #12148/5004c9f7 backport][stable-12] xml: preserve DOCTYPE declaration when writing XML files (#12248) 2026-06-13 17:33:13 +02:00
test-pretty-print-only.xml
test-pretty-print-only.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-pretty-print.xml
test-pretty-print.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-attribute.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-attribute.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-element.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-element.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-namespaced-attribute.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-namespaced-attribute.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-remove-namespaced-element.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-remove-namespaced-element.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-attribute-value-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-attribute-value-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-attribute-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-attribute-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-children-elements-empty-list.xml xml children module parameter does not exist (#5808) 2023-01-14 18:22:00 +01:00
test-set-children-elements-empty-list.xml.license xml children module parameter does not exist (#5808) 2023-01-14 18:22:00 +01:00
test-set-children-elements-level.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-children-elements-level.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-children-elements-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-children-elements-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-children-elements-value.xml add special word '+value' to add_children/set_children in xml module (#8437) 2025-05-31 16:42:24 +02:00
test-set-children-elements-value.xml.license add special word '+value' to add_children/set_children in xml module (#8437) 2025-05-31 16:42:24 +02:00
test-set-children-elements.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-children-elements.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-element-value-empty.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-element-value-empty.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-element-value-unicode.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-element-value-unicode.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-element-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-element-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-namespaced-attribute-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-namespaced-attribute-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
test-set-namespaced-element-value.xml Make sure all files have trailing newline (#5076) 2022-08-05 21:08:41 +02:00
test-set-namespaced-element-value.xml.license Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00