One line XML files

XML can be hard to read without any formatting. The computer could care less but human eyes cannot easily see the patterns.

This recently became obvious with the FedUtil program that comes with Windows Identity Foundation. All the XML ends up on a single line.

There are two easy ways to solve this problem:

1. Use Visual Studio and press CTRL-K CTRL-D to automatically format
2. Open the file in Internet Explorer (make sure the file ends with XML)

It makes a huge difference. Human readable, imagine that.


It is possible to apply this strategy to source as well in Visual Studio:

  1. Select the text you want to auto format (Ctrl-A for everything in the document)
  2. Ctrl-K, Ctrl-F (or Edit/Advanced/Format Section)

This can be very handy for normalizing the code without spending time making sure everything aligns properly.




Tagged with:
Posted in Uncategorized
One comment on “One line XML files
  1. says:

    If only the computer can see the way human do… The irony is that the human brain is the most powerful computer you can ever find…

Comments are closed.

Follow Red Circle Blog on
%d bloggers like this: