title: Set XMLDataProvider source dynamically
body: <p>While all examples and sources I found is to set the resource in XAML statically, I would only know in run time the name of the XML file to be connected with XMLDataProvider. Is there a way to set  either in code behind or in XAML?</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;XmlDataProvider x:Key="XMLFoo" Source="Foo.xml" XPath="Foo"/&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>It could be Foo.xml, or could be Goo.xml. </p>