title: Getting "hexadecimal value 0x3C, is an invalid attribute character" in correct Japanese XML
body: <p>All, I'm getting </p>
  
  <blockquote>
    <p>hexadecimal value 0x3C, is an invalid attribute character</p>
  </blockquote>
  
  <p>error while trying to read XML on computer with Japanese locale and Japanese characters in the file:</p>
  
  <pre><code>  $xml = [xml]@(Get-Content $file)
  </code></pre>
  
  <p>Specific place in the XML is pretty benign:</p>
  
  <pre><code>&lt;Control type="select"&gt;
  </code></pre>
  
  <p>As far as I can tell almost every error like that is caused by "&lt;" somewhere in the string. So I checked my XML and did not see any extra "&lt;" where it shouldn't be. 
  But then I've found one <a href="https://support.microsoft.com/en-us/help/2787651/error-when-you-run-the-best-practices-analyzer-tool-on-a-computer-that" rel="nofollow noreferrer">hotfix description</a> that says this:</p>
  
  <blockquote>
    <p>Consider the following scenario: You have a computer that is running Windows Server 2012. The system locale setting of the computer is set
    to Japanese. You install the Network Policy and Access Services (NPAS)
    server role with default settings on the computer. You try to run the
    Best Practices Analyzer tool to scan Network Access Protection (NAP)
    components.</p>
  </blockquote>
  
  <p>Kinda sounds familiar, so I suspect it's due to Japanese locale or due to Japanese characters in some of the values for the XML.</p>
  
  <p>The file itself starts like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  
  
  <p>Any ideas?</p>