Форматирование XML

Форматирует и выравнивает код для чтения, не заменяя проверку выполнения.

Ввод: ТекстРезультат: Текст

Текстовый ввод

Параметры инструмента

Примеры

Read the title and timestamp in an Atom feed

Ввод

<feed xmlns="http://www.w3.org/2005/Atom"><title>Example Feed</title><updated>2003-12-13T18:30:02Z</updated><entry><title>Atom-Powered Robots Run Amok</title><id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id></entry></feed>

Expected answer

<feed
  xmlns="http://www.w3.org/2005/Atom">
  <title>Example Feed</title>
  <updated>2003-12-13T18:30:02Z</updated>
  <entry>
    <title>Atom-Powered Robots Run Amok</title>
    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
  </entry>
</feed>
Отступ строки
Inspect a sitemap containing two public tool URLs

Ввод

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://serialize.dev/tools/from-base64/</loc></url><url><loc>https://serialize.dev/tools/json-beautify/</loc></url></urlset>

Expected answer

<urlset
  xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://serialize.dev/tools/from-base64/</loc>
  </url>
  <url>
    <loc>https://serialize.dev/tools/json-beautify/</loc>
  </url>
</urlset>
Отступ строки
Separate an SVG circle from its view box

Ввод

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="#005fcc"/></svg>

Expected answer

<svg
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
    <circle cx="50" cy="50" r="40" fill="#005fcc"/>
</svg>
Отступ строки
Read namespace prefixes in a SOAP envelope

Ввод

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><m:GetPrice xmlns:m="urn:store"><m:ISBN>9780141439518</m:ISBN></m:GetPrice></soap:Body></soap:Envelope>

Expected answer

<soap:Envelope
	xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
	<soap:Body>
		<m:GetPrice
			xmlns:m="urn:store">
			<m:ISBN>9780141439518</m:ISBN>
		</m:GetPrice>
	</soap:Body>
</soap:Envelope>
Отступ строки
Keep a CDATA expression separate from XML markup

Ввод

<rule><name>Temperature alert</name><expression><![CDATA[temp < 0 && enabled]]></expression></rule>

Expected answer

<rule>
  <name>Temperature alert</name>
  <expression>
    <![CDATA[temp < 0 && enabled]]>
  </expression>
</rule>
Отступ строки

Параметры

ПараметрЗначение по умолчаниюВвод и варианты
Отступ строки"\\t"Поддерживаются escape-последовательности \n, \r и \t

Похожие инструменты

Форматирование кода

Справка об операции

Открыть исходную техническую документацию (English)