NAME

xmlq - XML query command for Developer Dashboard

SYNOPSIS

dashboard xmlq [path] [file]

DESCRIPTION

This command provides XML query extraction for Developer Dashboard.

PURPOSE

This staged helper owns the public dashboard xmlq command. It accepts a path or $d-based Perl expression plus an optional input file, then hands the request to the shared query runtime so parsing, file-vs-STDIN handling, and output formatting stay consistent with the rest of the dashboard toolchain.

WHY IT EXISTS

It exists because XML inspection is part of the dashboard query family and should stay behind the same staged-helper and shared-runtime contract as the other query helpers. The helper now exposes decoded XML trees instead of making callers dig raw XML back out of a wrapper field.

WHEN TO USE

Use this file when changing the public dashboard xmlq argv contract, the XML helper examples, or the staged handoff into the shared query runtime.

HOW TO USE

Users run dashboard xmlq [path] [file]. The staged helper selects the XML backend in the shared query runtime, which accepts the file and path in either order, reads STDIN when no file is given, decodes XML into nested Perl hashes and arrays, stores XML attributes under _attributes, stores mixed text under _text, and lets dotted paths or $d-based Perl expressions walk that decoded tree. Use $d or . when you need the whole decoded document.

WHAT USES IT

It is used by the public dashboard xmlq command, by shell snippets that want a runtime-local XML inspection tool, and by query-helper coverage under t/ that locks in the decoded-tree contract.

EXAMPLES

printf '<root><value>demo</value></root>' | dashboard xmlq root.value
dashboard xmlq feed.xml '$d'
dashboard xmlq '$d' feed.xml
printf '<root><item id="1">x</item><item id="2">y</item></root>' | dashboard xmlq 'join q(,), map { $_->{_attributes}{id} } @{ $d->{root}{item} }'