What problem does it solve? Hand-editing XML with sed, regex, or string concatenation breaks on namespaces, attribute escaping, CDATA, and entity quoting, silently producing malformed or wrong-structured documents. This Skill replaces text-level edits with a parse-edit-serialize-reparse workflow that guarantees well-formed output and reviewable diffs. ## Core Features & Use Cases - Tree-based editing: Parse XML into an lxml element tree, modify elements and attributes via XPath and SubElement, then serialize with correct escaping by construction. - Round-trip diff discipline: Prove the serializer reproduces the untouched file byte-for-byte before editing, so a two-value change on a pfSense config.xml produces a reviewable diff instead of thousands of rewritten lines. - Validation and safety: Re-parse serialized output to confirm well-formedness, validate against XSD schemas, and disable entity expansion and network access when parsing untrusted XML to prevent XXE attacks. - Use Case: Add a host override to a firewall's config.xml, verify the round-trip assertion passes, and commit a diff showing exactly the six intended lines. ## Quick Start Use the files-edit-xml skill to add a new host entry to my pfSense config.xml and verify the output re-parses cleanly.