title: PHP XMLReader problem with htmlentities
body: <p>I am processing an external xml document using the method described here ( <a href="https://stackoverflow.com/questions/1835177/how-to-use-xmlreader-in-php/1835324#1835324">How to use XMLReader in PHP?</a> ), but I'm coming across this error:</p>
  
  <blockquote>
    <p>...parser error : Entity 'Atilde' not defined in...</p>
  </blockquote>
  
  <p>and similar, such as</p>
  
  <blockquote>
    <p>cent, acirc, not</p>
  </blockquote>
  
  <p>The error occurs on the $z->expand() function. If I comment that out, it occurs on the $z->next() function.</p>
  
  <p>I know the problem field and have tried to edit it with base64_encode before expanding, but it's readonly.</p>
  
  <p>EDIT: the problem string is:</p>
  
  <pre><code>...&amp;Atilde;&amp;cent;&amp;acirc;&amp;not;&amp;Acirc;...
  </code></pre>
  
  <p>end edit</p>
  
  <p>Thank you for any help given.</p>