XML

The xml driver reads XML data and queries it with Polars SQL.

URL format

xml://<file>[?infer_schema_length=<rows>&ignore_errors=<true|false>]

Options

OptionBehavior / default
infer_schema_lengthRows used to infer column types; default 100. Set 0 to examine all rows.
ignore_errorsIgnore reader conversion errors when true; default false.

Examples

rsql --url 'xml://people.xml' -- 'SELECT * FROM people LIMIT 10;'
rsql --url 'xml://people.xml?infer_schema_length=0'

Usage notes

The driver converts XML elements and attributes into records before loading them.

Use a relative path such as xml://people.xml or an absolute path such as xml:///data/people.xml. Percent-encode spaces and URL delimiters in filenames.

The file is loaded into an in-memory Polars SQL context. Its table name is the filename before the first dot: people.csv becomes people. Use .tables and .describe people to inspect the imported data. Query results and session changes do not write back to the source file.