title: Reading particular elements deep inside from an XML file java
body: <p>I have to read an android manifest file which look like the following,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest android:versionCode="92" android:versionName="1.9.7B92" package="com.rechild.advancedtaskkiller"
    xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;application android:label="@string/app_name" android:icon="@drawable/icon2"&gt;
          &lt;activity android:label="@string/app_name" android:name=".AdvancedTaskKiller" android:launchMode="singleTask" android:configChanges="keyboardHidden|orientation"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.rechild.intent.action.ADVANCED_TASK_KILLER_FREE" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".NewSettings" /&gt;
          &lt;activity android:name=".IgnoreListActivity"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.rechild.advancedtaskkiller.intent.action.IgnoreList" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".HealthActivity" /&gt;
          &lt;activity android:name=".LogActivity" /&gt;
          &lt;activity android:name=".HelpActivity" /&gt;
          &lt;activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation" /&gt;
          &lt;receiver android:name=".AutoStartReceiver"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;service android:name=".BackService" android:exported="true" /&gt;
          &lt;receiver android:label="@string/app_name" android:icon="@drawable/icon2" android:name=".OneClickAppWidgetProvider"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE" /&gt;
              &lt;/intent-filter&gt;
              &lt;meta-data android:name="android.appwidget.provider" android:resource="@xml/appwidget_provider" /&gt;
          &lt;/receiver&gt;
          &lt;receiver android:name=".AlarmReceiver" /&gt;
      &lt;/application&gt;
      &lt;uses-permission android:name="android.permission.RESTART_PACKAGES" /&gt;
      &lt;uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
      &lt;uses-permission android:name="android.permission.READ_LOGS" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-sdk android:minSdkVersion="3" /&gt;
      &lt;supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" /&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>My goal is to read the values of the <strong>android:name</strong> property in all <strong><em>activity</em></strong> elements. How can I achieve that in java?</p>