-
-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yq does not preserve XML doctype and declaration #1344
Comments
Yes, I think Only with an option e.g., |
FYI - working on this |
This will be updated in the next release v4.29.x will the following new flags:
Note that I've also realised that there's a potential naming conflict with the current default attribute prefix of From v4.30.x the new default attribute prefix will be |
Fixed in 4.29.1 |
Using yq to edit a xml file, the headers (doctype and xml declaration) are not preserved by the editing process.
Version of yq: 4.27.5
Operating system: Ubuntu 22.04 Impish Indri
Installed via: binary release (yq_linux_amd64.tar.gz)
Input Xml
/etc/iwatch/iwatch.yml:
Command
Actual behavior
Expected behavior
Additional context
The doctype is used to add validation information to XML documents. It is a important feature. The xml declaration is mandatory according to the XML standard.
The text was updated successfully, but these errors were encountered: