Using only vim builtins:
First replace all >< with > [newline] < :
:%s/></>\r</g
Then to reindent:
gg=G
These steps give me the right output for your example data.
Using only vim builtins:
First replace all >< with > [newline] < :
:%s/></>\r</g
Then to reindent:
gg=G
These steps give me the right output for your example data.