title: Can't seem to parse a xml file in android without getting a saxparser unexpected token error
body: <p>I've been fighting trying to parse a basic xml file in a little test android app.</p>
  
  <p>The code I have is the following:</p>
  
  <pre><code>InputStream is = getResources().openRawResource(R.xml.content);
  DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
  try {
        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
        Document doc = dBuilder.parse(is,"UTF-8"); //Blows up right here.
        // Bunch more stuff here
  }
  </code></pre>
  
  <p>My xml looks like the following:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;main&gt;
      &lt;background&gt;
          &lt;defintion&gt;This is a test&lt;/defintion&gt;
      &lt;/background&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>The problem is that when I try to parse this I get an <code>org.xml.sax.SAXParseException: Unexpected token (position:TEXT unprintable characters here ...@3:252 in java.io.InputStreamReader@411f3898)</code> error.
  I googled around and all the other solutions I found don't seem to work.</p>
  
  <p>I double checked that the file is UTF-8, and changed it's encoding back and forth between UTF-16 and UTF-8 (tried both with and without BOM) with notepad++, and updated the program to properly reflect this, but no matter what I do, I always get this error. I'm sure I must just be missing something very obvious, but no matter what series of combinations I try this always fails.</p>