mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 23:00:19 +03:00
e8f0677f94
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>
14 lines
477 B
TypeScript
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',
|
|
});
|