title: XmlPullParser:PI must not start with xml, but only on Android 2.3.3 downwards
body: <p>I get no error on Android 3.0+, but only on Android 2.2, 2.3.3 when I try to parse a small XML file via <code>XmlPullParser</code>, the app breaks with an error:</p>
  
  <pre><code>org.xmlpull.v1.XmlPullParserException: PI must not start with xml 
  (position:unknown @1:5 in java.io.InputStreamReader@40568770) 
  </code></pre>
  
  <p><strong>What is PI mentioned in the error???</strong></p>
  
  <p>I found out that this may cause the first line of XML file (<code>&lt;?xml version="1.0" encoding="utf-8"?&gt;</code>), but I did not find the reason why this is happening on lower Android versions. </p>
  
  <p>If this is the cause of error (first line of XML file), how can I fix this? </p>
  
  <p><strong>Should I:</strong><br>
  a) ask the admin of web server to change XML? If yes, what he should change in XML?<br>
  b) substring <code>InputStream</code> using <code>BufferedReader</code>?</p>
  
  <p>Somehow I think that <strong>the 2nd approach will cause extra delays</strong> on weak Android phones. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I pulled XML content from debugger and saw that the first like is ending with <code>\r\n</code>, then the next characters starts. Does this say anything to you? </p>
  
  <p>And this is how XML file look like. It's a small one and there is no visual reason why app is crashing. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;song&gt;
    &lt;artist&gt;Pink Floyd&lt;/artist&gt;
    &lt;title&gt;Shine On You Crazy Diamond&lt;/title&gt;
    &lt;picture&gt;http://www.xxyz.com/images/image.jpg&lt;/picture&gt;
    &lt;time&gt;Fri, 23 Nov 2012 11:22:31 GMT&lt;/time&gt;
  &lt;/song&gt;
  </code></pre>
  
  <p>This is how InputStream taken from this XML look like (starting chars only). </p>
  
  <p><img src="https://i.stack.imgur.com/YBiPE.png" alt=""></p>
  
  <p>Please advise!!! </p>