audit-xml-parsing

Audit XML parsing for encoding corruption, malformed XML, and ParseError handling gaps.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/ElPoot/contabilidad --skill audit-xml-parsing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: audit-xml-parsing
Source: https://github.com/ElPoot/contabilidad/tree/main/.agents/skills/audit-xml-parsing
Command: npx skills add https://github.com/ElPoot/contabilidad --skill audit-xml-parsing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you verify that the project’s XML parsing remains reliable when XML files are corrupted, encoded incorrectly, or contain malformed content that triggers ParseError, preventing broken ingestion flows.

Core Features & Use Cases

  • Encoding robustness audit: Checks whether the XML manager applies a safe decoding order (UTF-8, Latin-1 fallback, BOM handling) and whether real-world cases like FAPEMO (declared UTF-8 but encoded in Latin-1) are handled correctly.
  • ParseError recovery & observability: Reviews how ParseError/XMLSyntaxError is caught, what contextual information is preserved (file/line/column), and whether errors are recorded in a user-debuggable way.
  • Integration-focused review: Validates how parse_errors collected in factura_index.py affect downstream behavior (omit/retry/report) so failures become discoverable rather than silent.

Quick Start

Ask the auditor to review the current code in gestor_contable/core/xml_manager.py and gestor_contable/core/factura_index.py and produce an evidence-based report on encoding fallbacks and ParseError handling, including a verdict of SIN PROBLEMAS vs REQUIERE ATENCION.

Frequently Asked Questions about audit-xml-parsing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit XML parsing for encoding corruption and malformed fiscal documents?

Auditing XML parsing for encoding corruption involves inspecting your XML manager's decoding order and ParseError handling to detect malformed fiscal documents. The review checks UTF-8 and Latin-1 fallbacks, BOM handling, and whether parse errors retain sufficient debug context.

How does Latin-1 fallback handle UTF-8 declared fiscal files like FAPEMO?

Latin-1 fallback handles UTF-8 declared fiscal files by applying a safe decoding order when declared encoding fails. It catches encoding corruption in files like FAPEMO, preventing broken ingestion flows by verifying the fallback logic correctly processes Latin-1 encoded content.

What is the best way to recover contextual debug info from XML ParseError?

Recovering contextual debug info from XML ParseError requires catching the error and preserving file, line, and column details. The audit evaluates whether your parsing code records this context in a user-debuggable way so failures become discoverable rather than silent.

Does my XML ingestion pipeline need a specific structure to expose parse errors?

Your XML ingestion pipeline needs a structure that aggregates and exposes parse errors downstream. The audit evaluates how your index file collects parse errors and validates whether downstream behavior omits, retries, or reports failures to ensure they remain discoverable.

Why does my fiscal document ingestion fail silently on malformed XML?

Fiscal document ingestion fails silently on malformed XML when ParseError handling gaps prevent errors from being recorded. The audit identifies missing contextual preservation and checks if parse errors are aggregated properly to prevent silent ingestion failures.

Can I audit BOM handling and encoding fallbacks without external dependencies?

You can audit BOM handling and encoding fallbacks without external dependencies by reviewing your existing XML parsing code. The audit relies on inspecting specific functions and grep patterns internally to produce an evidence-based report on encoding robustness.