I saw the following line in an XML file:
xmlns:android="http://schemas.android.com/apk/res/android"
I have also seen xmlns in many other XML files that I’ve come across.
What is it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It defines an XML Namespace.
In your example, the Namespace Prefix is “android” and the Namespace URI is “http://schemas.android.com/apk/res/android“
In the document, you see elements like:
<android:foo />Think of the namespace prefix as a variable with a short name alias for the full namespace URI. It is the equivalent of writing
<http://schemas.android.com/apk/res/android:foo />with regards to what it “means” when an XML parser reads the document.NOTE: You cannot actually use the full namespace URI in place of the namespace prefix in an XML instance document.
Check out this tutorial on namespaces: http://www.sitepoint.com/xml-namespaces-explained/