title: Powershell importing Azure publish settings Invalid XML
body: <p>I downloaded the "*.publishsettings" file from the Azure portal, but when executing the following command: </p>
  
  <pre><code>Import-AzurePublishSettingsFile - PublishSettingsFile ".\filename.publishsettings"
  </code></pre>
  
  <p>I get the following error all the time: </p>
  
  <blockquote>
    <p>Import-AzurePublishSettingsFile : There is an error in XML document (1, 2).
    At E:\GIT\Taxprep Dashboard\web-application-ng\scripts\Azure-Publish.ps1:10 char:1
    + Import-AzurePublishSettingsFile -PublishSettingsFile ".\filename.pushl ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : CloseError: (:) [Import-AzurePublishSettingsFile], InvalidOperationException
        + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.ImportAzurePublishSettingsCommand</p>
  </blockquote>
  
  <p>Note: At the time of writing this question, I have already found the solution, but am still writing it up as I did not find anything on to fix this on StackOverflow, so I will answer it below. </p>