首页
Tom Utilities

XML 格式化

XML 与 YAML 工具

使用统一的缩进美化 XML,并可选择对属性换行。

输入

结果

使用方法

How to format XML

Paste XML and press Format. Nested elements are indented and parse errors are reported with a message.

  1. Paste XML into the input editor.
  2. Press Format.
  3. Copy the beautified document.

常见问题

Does it validate XML too?

Yes. If the document is not well formed the formatting stops and the error is displayed.

Which indentation is used?

Two spaces by default, and you can switch to four spaces or tabs from the toolbar.