android - XML head中句子的含义

标签 android xml

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

当我制作 android 应用程序时,我在 XML 文件的头部看到了一句话。但我不知道它的含义。

最佳答案

我假设你在谈论

<?xml version="1.0" encoding="UTF-8"?>

http://www.w3schools.com/xml/xml_tree.asp

引用上面的链接

第一行是 XML 声明。它定义了 XML 版本 (1.0)。

同时检查

http://en.wikipedia.org/wiki/UTF-8

<LinearLayout xmlns:android="schemas.android.com/apk/res/android"; 

它是你在 xml 中的 LinearLayout

xmlns-它的xml命名空间

在 stackoverflow 上快速搜索同一主题会给出以下链接,这些链接应该可以回答您的问题

Why this line xmlns:android="http://schemas.android.com/apk/res/android" must be the first in the layout xml file?

What does "xmlns" in XML mean?

关于android - XML head中句子的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21821668/

相关文章:

python - 如何使用 wsdl2py 生成的复杂类型从 python 中的 Web 服务发送响应

android - AsyncTask 期间 UI 卡住

android - 找不到.so文件android studio

android - 如何在将 ArrayList 添加到 Android 中的 HashMap 后清除 ArrayList?

c# - "<?xml version="1.0 "?>"c# linq 或 XDocument 删除编码 = UTF-8

解码 XML 时发生 javax.xml.bind.UnmarshalException

xmllint 无法使用没有命名空间的 xpath 正确查询

xml - 使用 VB 发送/POST xml 文件

android - 如何以编程方式在 Android 中创建 ListView 和标题(动态)?

android - POPUPMENU 图标未在已发布的 apk 版本中显示