Meridianmeridian

XML Document

container.object.xml

XML (Extensible Markup Language) document stored as VARCHAR. Structured hierarchical data with tags and attributes.

Domain
container
Category
object
Casts to
VARCHAR
Scope
Universal

Try it

CLI
$ finetype infer -i "<root><name>John</name><age>30</age></root>"
→ container.object.xml

DuckDB

Detect
SELECT finetype('<root><name>John</name><age>30</age></root>');
-- → 'container.object.xml'
Cast expression
CAST({col} AS VARCHAR)
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS VARCHAR) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'container.object.xml';

Decompose

Expression
RECURSIVE_INFER_ON_XML_CHILDREN({col})

JSON Schema

finetype schema container.object.xml
{
  "$id": "https://meridian.online/schemas/container.object.xml",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "XML (Extensible Markup Language) document stored as VARCHAR. Structured hierarchical data with tags and attributes.\nRECURSIVE INFERENCE: When classified as container.object.xml, FineType will: 1. Parse XML and identify root element 2. Extract and classify child element values 3. Return as nested struct (partial, may require schema)",
  "examples": [
    "<root><name>John</name><age>30</age></root>",
    "<user id=\"123\"><email>john@example.com</email></user>"
  ],
  "pattern": "^<.*>.*</.*>$",
  "title": "XML Document",
  "type": "string",
  "x-finetype-broad-type": "VARCHAR",
  "x-finetype-transform": "CAST({col} AS VARCHAR)"
}

Examples

<root><name>John</name><age>30</age></root><user id="123"><email>john@example.com</email></user>

Aliases

xml_document