xml: fix `print_match` not populating `matches` return value (#12013)
* fix(xml): populate matches when print_match is set, fix returned doc
* test(xml): add integration tests for print_match
* changelog: add fragment for PR 12013
---------
(cherry picked from commit abef8f2aed)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>