/** * XmlDiff — G16 * ────────────── * Structural XML diff utility. * * `diffXml(doc1, doc2)` returns a list of `XmlChange` records describing * added, removed, and modified nodes/attributes between two XML documents. * * Design notes * ──────────── * • Comparison is structural (not text-based) — attribute order, comment nodes * and whitespace-only text nodes are ignored by default. * • Element matching within siblings uses local-name + position (1-based), * consistent with the XPath paths used by ValidationResult. * • No external dependencies. */ import { XmlDocument } from '../parser/XmlNodes'; export type XmlChangeType = 'added' | 'removed' | 'modified' | 'type-change'; export interface XmlChange { type: XmlChangeType; /** XPath-like path to the changed node */ path: string; /** Previous value (for 'modified' / 'removed') */ from?: string; /** New value (for 'modified' / 'added') */ to?: string; } export interface XmlDiffOptions { /** * Ignore whitespace-only text nodes (default: true). * When true, text nodes that contain only whitespace are not compared. */ ignoreWhitespace?: boolean; /** * Ignore XML comments (default: true). */ ignoreComments?: boolean; /** * Ignore processing instructions (default: true). */ ignorePI?: boolean; } /** * Compute the structural diff between two XML documents. * Returns an array of `XmlChange` records in document order. */ export declare function diffXml(doc1: XmlDocument, doc2: XmlDocument, options?: XmlDiffOptions): XmlChange[]; //# sourceMappingURL=XmlDiff.d.ts.map