Wednesday, 1 May 2013

What does “xmlns” in Android XML mean?

Generally we write following line in android xml file.
xmlns:android="http://schemas.android.com/apk/res/android"

 It defines XML Namespace.

The Namespace Prefix is "android" and the Namespace URI is "http://schemas.android.com/apk/res/android"

Basically, every element (or attribute) in xml belongs to a namespace, a way of "qualifying" the name of the element.

Example :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

No comments:

Post a Comment