{
  "slug": "xml-to-csv",
  "name": "gizza-ai/xml-to-csv",
  "version": "0.1.0",
  "title": "XML to CSV — Convert XML to a CSV table — gizza.ai",
  "description": "Flatten repeated XML elements into a CSV table, with columns inferred from child tags and attributes, in your browser. Free, private, no upload.",
  "tags": [
    "xml to csv",
    "xml csv converter",
    "convert xml",
    "flatten xml",
    "xml to spreadsheet"
  ],
  "category": "data",
  "urls": {
    "page": "https://gizza.ai/tools/xml-to-csv/",
    "markdown": "https://gizza.ai/tools/xml-to-csv/index.md",
    "descriptor": "https://gizza.ai/tools/xml-to-csv/tool.json",
    "deep_link_example": "https://gizza.ai/tools/xml-to-csv/?xml=%3Ccatalog%3E%0A%20%20%3Cbook%3E%3Ctitle%3EDune%3C%2Ftitle%3E%3Cauthor%3EHerbert%3C%2Fauthor%3E%3C%2Fbook%3E%0A%20%20%3Cbook%3E%3Ctitle%3EHyperion%3C%2Ftitle%3E%3Cauthor%3ESimmons%3C%2Fauthor%3E%3C%2Fbook%3E%0A%3C%2Fcatalog%3E&record=book&attributes=true&delimiter=%2C"
  },
  "cli": "gizza tool xml-to-csv \"<catalog>\n  <book><title>Dune</title><author>Herbert</author></book>\n  <book><title>Hyperion</title><author>Simmons</author></book>\n</catalog>\"",
  "tool": {
    "description": "Convert XML into a CSV table: pick the repeated `record` element (e.g. <book> inside <catalog>) — auto-detected as the most frequent child of the root when omitted — and turn each one into a CSV row. Columns are inferred, in first-seen order, from the record's child element tags; nested elements flatten to dot-notation columns (<address><city> → 'address.city'). With attributes=true (default) each attribute also becomes a column ('@attr' on the record, 'path@attr' on a nested element). Repeated tags get .2/.3 suffixes, missing fields become empty cells, XML entities and CDATA are decoded, and values are CSV-quoted as needed. delimiter is a single char or comma/tab/semicolon/pipe. Fully local and deterministic — no AI model.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "attributes": {
          "default": true,
          "description": "Include attributes as columns: '@attr' on the record element, 'child@attr' on a child. Default true.",
          "type": "boolean"
        },
        "delimiter": {
          "default": ",",
          "description": "Field separator: a single char or 'comma'/'tab'/'semicolon'/'pipe'. Default ','.",
          "type": "string"
        },
        "record": {
          "description": "The repeated element tag to treat as a row (e.g. 'book'). Leave empty to auto-detect the most frequent child of the root.",
          "type": "string"
        },
        "xml": {
          "description": "The XML text to flatten.",
          "type": "string"
        }
      },
      "required": [
        "xml"
      ],
      "type": "object"
    }
  }
}