Wednesday, August 7, 2013

Visual Studio hotkey for formatting XML: Ctrl+k+f

There will inevitably come a time when you're going to obtain some XML output that you need to review that would, in all honesty, be impossible to read without proper formatting.  A good example would be this response from the the YouTube API that provides a list of videos that a specified user has uploaded (i.e. which would appear as follows in Notepad):




In many cases, simply copying and pasting the XML it into Visual Studio might work, but, in the off chance it doesn't, you might get something like this.




If that happens, simply hit Ctrl+k+f and the XML will be displayed in an easy-to-read format:



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.