how can I export database in MariaDB to outside environment e.g. to text file or other format
Answer Answered by Daniel Black in this comment.
SELECT INTO OUTFILE for CSV/TSV like formats. mariadb-dump --xml is an XML format. Other formats can be achieved fairly easy with a programming language that can communicate to the database and generate the format easily.