Exporting to xml file, opened db or selected table