Uncheck the option "keep white spaces" in the settings.

In IDEA 12, File > Settings > Code Style (left menu panel) > XML (left menu panel) > Other (tab) > Keep White Spaces (checkbox)

How do I set IntelliJ to place xml tags on separate lines when formatting xml files?
I'm having trouble with a \@for loop. I've got a macro that takes a comma delimited list and puts each element into a row of an array.  When I do this using a \@for loop, I get an extra row that I don't understand.  I can manually get rid of it with a negative space, (as in the commented line below) but that can't be the right way to do it, so I must be doing something wrong.  Here's a minimal example.  For comparison, if I construct what I expect the result of the loop to be manually, the extra row doesn't appear.

\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\fbun}[1]
   {\ensuremath{\left[\begin{array}{c}
      \@for\xx:=#1\do {\text{\xx}\\}
%     \\ [-2.75ex] % why is this required?
      \end{array}\right]}}
\makeatother
\begin{document}
$\left[\begin{array}{c}
      A\\
      B\\
      C\\
      D\\
      \end{array}\right]$
% same array, but generated by a macro
\fbun{A,B,C,D}
\end{document}



