Files
it-tools/src/tools/xml-diff/index.ts
T
e8f0677f94 feat(xml-diff): add XML diff tool
Compare two pasted XML documents and highlight the differences, mirroring
the JSON diff tool's UI and diff engine. XML is parsed with a native
DOMParser-based normalizer (attributes as @name, text-only leaves as plain
strings) instead of xml-js, and a reconciliation step coerces mismatched
single/repeated element shapes into arrays before diffing so a repeated
element compares cleanly instead of producing a garbled type-mismatch diff.

From PR #1840
Fix #1839

Co-Authored-By: @sharevb
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-22 21:06:08 +01:00

14 lines
477 B
TypeScript

import { defineTool } from '../tool';
import { translate as t } from '@/plugins/i18n.plugin';
export const tool = defineTool({
name: t('tools.xml-diff.title'),
path: '/xml-diff',
description: t('tools.xml-diff.description'),
keywords: ['xml', 'diff', 'compare', 'difference'],
component: () => import('./xml-diff.vue'),
icon: defineAsyncComponent(() => import('@vicons/material/es/CompareArrowsRound')),
createdAt: new Date('2026-11-22'),
category: 'XML',
});