  This paper describes the measurements of flow harmonics $v_2$-$v_6$ in 3
$\mu\mathrm{b}^{-1}$ of Xe+Xe collisions at $\sqrt{s_{\mathrm{NN}}}=5.44$ TeV
performed using the ATLAS detector at the LHC. Measurements of the centrality,
multiplicity and $p_{\mathrm{T}}$ dependence of the $v_n$ obtained using
two-particle correlations and the scalar product technique are presented. The
measurements are also performed using a template-fit procedure, which was
developed to remove non-flow correlations in small collision systems. This
non-flow removal is shown to have a significant influence on the measured $v_n$
at high $p_{\mathrm{T}}$, especially in peripheral events. Comparisons of the
measured $v_n$ with measurements in Pb+Pb collisions and $p$+Pb collisions at
$\sqrt{s_{\mathrm{NN}}}=5.02$ TeV are also presented. The $v_n$ values in Xe+Xe
collisions are observed to be larger than those in Pb+Pb collisions for $n=2$,
3 and 4 in the most central events. However, with decreasing centrality or
increasing harmonic order $n$, the $v_n$ values in Xe+Xe collisions become
smaller than those in Pb+Pb collisions. The $v_n$ in Xe+Xe and Pb+Pb collisions
are also compared as a function of the mean number of participating nucleons,
$\langle N_\text{part} \rangle$, and the measured charged-particle multiplicity
in the detector. The $v_3$ values in Xe+Xe and Pb+Pb collisions are observed to
be similar at the same $\langle N_\text{part}\rangle$ or multiplicity, but the
other harmonics are significantly different. Comparisons of the $v_n$
measurements with theoretical calculations are also made.
