Skip to main content

Is there any CLI tool for Linux which formats XML files keeping any empty lines and comments? I have tried xmllintxmllint, tidytidy and xmlstarletxmlstarlet, but all seem to focus completely cleaning XML files rather than just indentation and spacing.

Is there any CLI tool for Linux which formats XML files keeping any empty lines and comments? I have tried xmllint, tidy and xmlstarlet, but all seem to focus completely cleaning XML files rather than just indentation and spacing.

Is there any CLI tool for Linux which formats XML files keeping any empty lines and comments? I have tried xmllint, tidy and xmlstarlet, but all seem to focus completely cleaning XML files rather than just indentation and spacing.

Source Link

CLI tool to format XML files keeping empty lines and comments

Is there any CLI tool for Linux which formats XML files keeping any empty lines and comments? I have tried xmllint, tidy and xmlstarlet, but all seem to focus completely cleaning XML files rather than just indentation and spacing.