2

我查看了这个老问题以了解 xmlns:android 的东西,这里 是 A xmlns:android,它实际上是如何工作的?

我是 XML 和 Android 的新手,所以我无法理解评论,我需要帮助。这是评论 -

从纯 XML 的角度来看,URI 不需要引用任何存在于任何地方的任何东西。您可以编写 xmlns:rutski="www.rutski.com" ,就 XML 而言,该文件就可以了。命名空间的存在允许您在其中放置节点。例如 android:orientation="vertical" 将方向属性放在 android 命名空间中。当文件由其他软件处理时,这变得相关,例如根据模式进行验证。架构将被定义为期望 XML 文件中的节点驻留在给定的命名空间中,即 schemas.android.com/apk/res/android。

1 - What exactly are these nodes and how does life become better by using them ?
    In the above comment, where is the node located ? 
2 - What would the xml look like if we did not use namespace ?   
4

0 回答 0