404 - Page Not Found

The page that you are looking for could not be found. I recently switched to a new content management platform so some of the old links no longer work. Below are the search results based on the link that you clicked on.

Cleaning up XML using VIM

Here is a quick function for cleaning up XML without any line breaks. This is a quick and dirty solution with some minor issues (e.g. turning <test></test> to <test>\n</test>), but the goal of this it not to be too accurate, but to quickly put a non-readable XML into a readable form for reference.

1
2
3
4
5
6
function! PrettifyXML()
	set ft=xml
	:%s/></>\r</g
	:0
	:norm =G
endfunction

Put this in your vimrc file and call it using :call PrettifyXML()