Suppose you need to transform one XML string into another XML string. And output XML must be formatted: with new lines and indents. So you can do it like this: