Namespace help to avoid conflict between two xml objects (xml data) of the same name.
First: 2 root with no namespace
Problem with prefix
After we differentiate between 2 Xml objects using prefix we also have a problem with prefix, imagine one of department of your company choose the same name for namespace like other department in the same company that choose the same name.
Solution
Use Uniform Resource Identifier by using URL, The purpose is to give the namespace a unique name. However, often companies use the namespace as a pointer to a web page containing namespace information
The namespace is defined by the xmlns attribute in the start tag of an element
The namespace declaration has the following syntax. xmlns:prefix="URI"
0 التعليقات:
إرسال تعليق