XML Advanced-from w3schools.com

作者:袖梨 2022-07-02
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

相关文章

精彩推荐

一聚教程网

Copyright © 2010-2022

111cn.net All Rights Reserved