title: Wpf Treeview issue
body: <p>How would i display the below XML to a WPF TreeView and it must display as follows</p>
  
  <p>Category Name (Easy Puzzle)</p>
  
  <ul>
  <li>Puzzle Name (#1)</li>
  </ul>
  
  <p>Category Name (Medium Puzzle)</p>
  
  <ul>
  <li>Puzzle Name (#1)</li>
  </ul>
  
  <p>Category Name (Hard Puzzle)</p>
  
  <ul>
  <li>Puzzle Name (#1)</li>
  </ul>
  
  <p><strong>XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;SudokuLibrary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;Puzzles&gt;
      &lt;SudokuPuzzle&gt;
        &lt;Category&gt;Easy Puzzle&lt;/Category&gt;
        &lt;Name&gt;#1&lt;/Name&gt;
        &lt;Rank&gt;3&lt;/Rank&gt;
        &lt;Format&gt;
          &lt;string&gt;6,0,0,5,0,4,7,0,0&lt;/string&gt;
          &lt;string&gt;4,9,5,0,0,8,3,6,0&lt;/string&gt;
          &lt;string&gt;1,0,7,0,0,0,0,0,0&lt;/string&gt;
          &lt;string&gt;0,5,0,0,0,1,4,2,8&lt;/string&gt;
          &lt;string&gt;0,0,0,2,0,9,0,0,0&lt;/string&gt;
          &lt;string&gt;3,2,1,8,0,0,0,5,0&lt;/string&gt;
          &lt;string&gt;0,0,0,0,0,0,5,0,3&lt;/string&gt;
          &lt;string&gt;0,1,3,6,0,0,8,7,4&lt;/string&gt;
          &lt;string&gt;0,0,8,1,0,3,0,0,2&lt;/string&gt;
        &lt;/Format&gt;
        &lt;Solution&gt;
          &lt;string&gt;6,3,2,5,1,4,7,8,9&lt;/string&gt;
          &lt;string&gt;4,9,5,7,2,8,3,6,1&lt;/string&gt;
          &lt;string&gt;1,8,7,9,3,6,2,4,5&lt;/string&gt;
          &lt;string&gt;7,5,9,3,6,1,4,2,8&lt;/string&gt;
          &lt;string&gt;8,6,4,2,5,9,1,3,7&lt;/string&gt;
          &lt;string&gt;3,2,1,8,4,7,9,5,6&lt;/string&gt;
          &lt;string&gt;9,7,6,4,8,2,5,1,3&lt;/string&gt;
          &lt;string&gt;2,1,3,6,9,5,8,7,4&lt;/string&gt;
          &lt;string&gt;5,4,8,1,7,3,6,9,2&lt;/string&gt;
        &lt;/Solution&gt;
        &lt;SaveState&gt;
          &lt;string&gt;6,0,0,5,0,4,7,0,0&lt;/string&gt;
          &lt;string&gt;4,9,5,0,0,8,3,6,0&lt;/string&gt;
          &lt;string&gt;1,0,7,0,0,0,0,0,0&lt;/string&gt;
          &lt;string&gt;0,5,0,0,0,1,4,2,8&lt;/string&gt;
          &lt;string&gt;0,0,0,2,0,9,0,0,0&lt;/string&gt;
          &lt;string&gt;3,2,1,8,0,0,0,5,0&lt;/string&gt;
          &lt;string&gt;0,0,0,0,0,0,5,0,3&lt;/string&gt;
          &lt;string&gt;0,1,3,6,0,0,8,7,4&lt;/string&gt;
          &lt;string&gt;0,0,8,1,0,3,0,0,2&lt;/string&gt;
        &lt;/SaveState&gt;
      &lt;/SudokuPuzzle&gt;
      &lt;SudokuPuzzle&gt;
       **...**
      &lt;/SudokuPuzzle&gt;
    &lt;/Puzzles&gt;
  &lt;/SudokuLibrary&gt;
  </code></pre>
  
  <p><strong>I tried the following below</strong></p>
  
  <pre><code>    &lt;ResourceDictionary&gt;
  &lt;XmlDataProvider x:Key="xmldata" Source="Data/SudokuLibrary.xml" XPath="/SudokuLibrary/Puzzles/SudokuPuzzle" /&gt;
              &lt;HierarchicalDataTemplate x:Key="xmldatatemplate" ItemsSource="{Binding}"&gt;
                  &lt;TextBlock Margin="0" Text="{Binding XPath=Name}" /&gt;
              &lt;/HierarchicalDataTemplate&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p><strong>TreeView</strong></p>
  
  <pre><code>&lt;Grid DataContext="{StaticResource xmldata}"&gt;
   &lt;Grid.RowDefinitions&gt;
      &lt;RowDefinition Height="*" /&gt;
      &lt;RowDefinition Height="Auto" /&gt;
   &lt;/Grid.RowDefinitions&gt;
   &lt;TreeView 
       x:Name="PuzzleTreeView"
       Grid.Row="0" 
       Width="140" 
       Padding="3" 
       Margin="10"
       ItemsSource="{Binding}"
       SelectedItemChanged="PuzzleTreeView_SelectedItemChanged"/&gt;
  </code></pre>
  
  <p></p>