docs: def _xml_min(src, dest='', preserve_comments=True):
      """Minify XML
  
      Args:
          src: xml string or path-to-file with text to minify (mandatory)
          dest: path-to-file to save minified xml string; if file doesn't exist
                it is created automatically; (optional)
                if this arg is skept function returns string
          preserve_comments: if set False, all comments are removed from minified text
                             default is True (comments are preserved)
  
      Returns: 1) minified XML string if dest is not provided
               2) length of saved file if dest is provided
  
      Example:
              xml.min('path/to/file.xml')
              xml.min('path/to/file.xml', 'path/to/save/result.xml')
              xml.min('path/to/file.xml', False)
              xml.min('path/to/file.xml', 'path/to/save/result.xml', False)
      """
  
      if dest == '':
          return _xml_min_exec(_text(src)) # returns string
      else:
          if type(dest) is bool:  # dest is skept, custom pattern provided at dist place
              return _xml_min_exec(_text(src), dest)
          else:
              with open(dest, 'w') as f2:
                  return f2.write(_xml_min_exec(_text(src), preserve_comments))