title: Android parsing an xml with saxparser
body: <p>I am trying to parse an xml file withSaxParser on Android.</p>
  
  <p>This is my xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;cars&gt;
      &lt;car model="CitroenC3"&gt;
          &lt;maintenances&gt;
              &lt;xm:maintenance xmlns:xm="it.a.b.android.c.car.m" distance="" price=""&gt;
                  &lt;xm:type&gt;&lt;/xm:type&gt;
              &lt;/xm:maintenance&gt;
          &lt;/maintenances&gt;
          &lt;chargings&gt;
              &lt;xc:charging xmlns:xc="it.a.b.c.fuelconsumption.car.m" quantity="18" price="20" distance="400" consumption="14"/&gt;
          &lt;/chargings&gt;
      &lt;/car&gt;
  &lt;/cars&gt;
  </code></pre>
  
  <p>And this is the code:</p>
  
  <pre><code>// Handling XML 
      SAXParserFactory spf = SAXParserFactory.newInstance();
      SAXParser sp = spf.newSAXParser();
      XMLReader xr = sp.getXMLReader();
  
      XmlResourceParser parser = getResources().getXml(R.xml.data);
  
      // Create handler to handle XML Tags ( extends DefaultHandler ) 
      DataSaxHandler myXMLHandler = new DataSaxHandler();
      xr.setContentHandler(myXMLHandler);
      InputStream is= getResources().openRawResource(R.xml.data);
      xr.parse(new InputSource(is));
  </code></pre>
  
  <p>After xr.parse I have the Exception:</p>
  
  <p>03-22 15:24:04.248: INFO/System.out(415): XML Pasing Excpetion = </p>
  
  <pre><code>org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: not well-formed (invalid token)
  </code></pre>
  
  <p>What may be wrong?
  Thanks a lot.</p>