title: Read XML file in Windows Phone 8.1 Background task
body: <p>I am building a Windows Phone 8.1 RT App which runs MP3 files in <strong>Background task</strong>.</p>
  <p>I followed the steps in the sample code shown here : <a href="http://code.msdn.microsoft.com/windowsapps/BackgroundAudio-63bbc319" rel="nofollow noreferrer">http://code.msdn.microsoft.com/windowsapps/BackgroundAudio-63bbc319</a></p>
  <p>In MyPlaylistManager Project I would like to build my own Playlist from XML file.</p>
  <p>When I try to access this XML file I am getting an exception.</p>
  <blockquote>
  <p>An exception of type 'System.Xml.XmlException' occurred in SYSTEM.XML.NI.DLL but was not handled in user code</p>
  <p>Additional information: An internal error has occurred.</p>
  </blockquote>
  <p>I have added the XML file to the Project and set</p>
  <blockquote>
  <p>Build Action : Content</p>
  <p>Copy to Output Directory : Copy if newer</p>
  </blockquote>
  <p>To access the file I tired below options :</p>
  <pre><code>  XDocument xdoc = XDocument.Load(&quot;ms-appx:///XYZ.xml&quot;);
  
    XDocument xdoc = XDocument.Load(&quot;XYZ.xml&quot;);
  </code></pre>
  <p>XDocument.Load is supported in Windows Phone 8.1 as per the documentation:
  <a href="http://msdn.microsoft.com/en-us/library/bb343181(v=vs.110).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb343181(v=vs.110).aspx</a></p>
  <p><img src="https://i.stack.imgur.com/v76gJ.png" alt="Directory Structure of my Solution" /></p>
  <p>Any pointers on what I am doing wrong.
  Thanks.</p>