[Home] [By Thread] [By Date] [Recent Entries]

  • From: Andrew Welch <andrew.j.welch@g...>
  • To: xml-dev <xml-dev@l...>
  • Date: Tue, 4 Jan 2011 14:01:51 +0000

Has anyone seen the use of namespaces in the Android config files?

Here's a sample HelloWorld one:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.andrewjwelch.helloandroid"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".HelloAndroid"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    <uses-sdk android:minSdkVersion="8" />

</manifest>

And a corresponding layout file:

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/textview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello"/>

They seem to have decided to put the elements in no namespace and most
of the attributes in an "android" namespace....   very odd.  Possibly
a mistake that its too late to change, and if so, a good example for
the need for a "MicroXML" for config files.


-- 
Andrew Welch
http://andrewjwelch.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member