title: WPF - Bind a ListView to a .xml file dynamically
body: <p>Is there a way (using the MVVM pattern) to dynamically bind a ListView to an xml file?
  Actually the ListView is binded to a static path, like:           </p>
  
  <pre><code>C:\DocumentsAndSettings\blabla\morebla\log.xml 
  </code></pre>
  
  <p>I need something like</p>
  
  <pre><code>AppPath\log.xml
  </code></pre>
  
  <p>Here's my code:
  in the View.xaml:</p>
  
  <pre><code>&lt;ListView ItemsSource="{Binding Source={StaticResource logDataSource}, ...
  </code></pre>
  
  <p>in the App.xaml:</p>
  
  <pre><code>        &lt;XmlDataProvider x:Key="logDataSource" 
                       Source="C:\DocumentsAndSettings\blabla\morebla\log.xml" 
                       d:IsDataSource="True"/&gt;
  </code></pre>
  
  <p>I'd like something like this:</p>
  
  <pre><code>        &lt;XmlDataProvider x:Key="logDataSource" 
                       Source="AppPath\log.xml" 
                       d:IsDataSource="True"/&gt;
  </code></pre>
  
  <p>Thank you in advance.</p>