Question: At the begining I would like to say hello, so ... Hello. I need to create a nested object structure. 
I've got an object (xaml page) like this

```
<navigation:Page x:Class="ItemTemplateExample.ContentItem" 
       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
       xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
       mc:Ignorable="d"
       xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
       d:DesignWidth="200" d:DesignHeight="20"
       Title="ContentItem Page">
<Grid x:Name="LayoutRoot">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="50"/>
        <ColumnDefinition Width="*"/>
    </Grid.ColumnDefinitions>
    <Button x:Name="button1" />
    <ContentControl  Grid.Column="1" x:Name="content1" />
</Grid>

```

Now I would like to use it in nested structure. For Example 

```
<local:ContentItem ButtonText="level 1">
     <local:ContentItem ButtonText="level 2" />
     <local:ContentItem ButtonText="level 2" />
     <local:ContentItem ButtonText="level 2">
          <local:ContentItem ButtonText="level 3" />    
     </local:ContentItem>
</local:ContentItem>

```

Where ButtonText will be known value (set when adding nested object) and Content of each object will be object of the same type. I have no idea how to start. Please give me some hint, exmaples. Thank You.

Answer: 
Use the Find and Replace dialog (`Ctrl` + `H`). Search for

```
\n\n

```

and replace with

```
\n

```

using regular expressions (expand the Find Options section to enable).

If you want to remove lines containing nothing but whitespace you could try searching for

```
\n\s*\n+

```
I don't think there is any. You can use a separate refactoring add-in to automate this, such as [ReSharper](http://en.wikipedia.org/wiki/ReSharper).