what is the exact usage of xmlns in xml, and html

前端 未结 5 2482
-上瘾入骨i
-上瘾入骨i 2021-02-20 02:42

Does any one know what is the exact usage of xmlns in HTML, XML files?

Edit: Why do we need this namespace? What is its usage?

5条回答
  •  礼貌的吻别
    2021-02-20 03:23

    XML namespaces help contextualize elements an attributes, among other things. It also offers a precise identification for a particular element or attribute.

    For instance, the element can be defined by anyone and have any meaning. However, the element within the http://www.w3.org/1999/xhtml namespace is unique and refers to the XHTML.

    Namespaces also prove useful when dealing with homographs, when using multiple XML languages in a single file.

提交回复
热议问题