一聚教程网:一个值得你收藏的教程网站

热门教程

XML Advanced-from w3schools.com

时间:2022-07-02 11:45:38 编辑:袖梨 来源:一聚教程网

XML Namespaces

--------------------------------------------------------------------------------
XML Namespaces provide a method to avoid element name conflicts.
--------------------------------------------------------------------------------
Name Conflicts
Since element names in XML are not fixed, very often a name conflict will occur when two different documents use the same names describing two different types of elements.
This XML document carries information in a table:





Apples Bananas


This XML document carries information about a table (a piece of furniture):

African Coffee Table
80
120


If these two XML documents were added together, there would be an element name conflict because both documents contain a element with different content and definition.
--------------------------------------------------------------------------------
Solving Name Conflicts using a Prefix
This XML document carries information in a table:


Apples
Bananas



This XML document carries information about a piece of furniture:

African Coffee Table