Namespaces |
|
An XML namespace is a document that makes it possible to distinguish the names of XML elements in a document. This makes it possible that two similar names be used in the same XML document but having different meanings.
To make a namespace useful, you must create it in a document that defines its members. To specify the location of that document, in the top section of the XML file that will use it, create an XML tag that contains an attribute named xmlns. The formula to follow is: <Name xmlns="Value"></Name> Like every XML tag, you start with a name. Like every attribute, the xmlns name must have a value. The value must be the address URL of the document that contains the definition of the namespace. Of course, the tag must be closed. Here is an example: <a xmlns:='http://some.website.com/'> </a> . Here is an example: <?x
|
|
|||||||
|