title: I cannot read the AttributeSet from my XML resources
body: <p>I'm trying to read an AttributeSet from an XML resource file. 
  The relevant code is the following:</p>
  
  <pre><code>//This happens inside an Activity
          Resources r = getResources();
          XmlResourceParser parser = r.getXml(R.layout.testcameraoverlay);
          AttributeSet as = Xml.asAttributeSet(parser);
  
          int count = as.getAttributeCount(); //count is 0!!??
  </code></pre>
  
  <p><code>count == 0</code>, so Android is not reading any attributes at all!</p>
  
  <p>The XML file(<code>R.layout.testcameraoverlay</code>):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;TextView
      xmlns:android="http://schemas.android.com/apk/res/android" 
      android:text="@string/app_name" android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;
  &lt;/TextView&gt;
  </code></pre>
  
  <p>Why can't I read the attributes?</p>