Hello,
XWiki supports some Markdown syntaxes with these extensions: https://extensions.xwiki.org/xwiki/bin/view/Extension/MarkdownSyntax/
This means that you can any XWiki page can be converted to MD in the UI (see https://www.xwiki.org/xwiki/bin/view/documentation/xs/user/base/page/view-page/change-syntax/).
It also means that programmatically you can use the Rendering Converter API to batch convert pages written in the xwiki/2.0 or xwiki/2.1 syntaxes (or any supported syntax FWIW, see https://rendering.xwiki.org/xwiki/bin/view/Main/WebHome#HSupportedSyntaxes) to MD.
Here’s a Java example to convert from one syntax to another: https://rendering.xwiki.org/xwiki/bin/view/Main/GettingStarted#HRenderXWikiSyntax2.1contentintoXHTML
See also all my answers above… (just realized that I had already answered, including providing a script to do it :)).
Hope it helps,