Skip to content

docs: add XML file usage examples to usage, man page, and README #144

Description

@vmvarela

Problem

Currently there are no examples showing how to use XML input files in:

  • The usage text (main.zig --help)
  • The man page (docs/sql-pipe.1.scd)
  • The README.md

Users may not discover that sql-pipe supports XML input via -I xml or --input-format xml, especially for nested structures like RSS feeds that require --xml-root and --xml-row.

Proposed Solution

Add XML usage examples to all three documentation locations:

  1. main.zig --help text — Add example showing basic XML input and the --xml-root/--xml-row flags
  2. docs/sql-pipe.1.scd — Add an EXAMPLES section with XML examples, including RSS feed navigation
  3. README.md — Add XML section in the "Input formats" area with a practical example

Example for main.zig (usage)

Add to the Examples section:

  cat data.xml | sql-pipe -I xml --xml-root channel --xml-row item "SELECT title FROM t"

Example for README.md

Add to "Input file formats":

### XML

sql-pipe supports row-based XML input. For nested XML (like RSS feeds), use --xml-root to navigate to the row container and --xml-row to filter specific elements:

    curl -s "https://feeds.feedburner.com/TheHackersNews" | sql-pipe -I xml --xml-root channel --xml-row item "SELECT title FROM t LIMIT 5"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions