TUTORIAL HOME
XML Namespaces
❮ Previous Next ❯
XML Namespaces provide a method to avoid element name conflicts.
Name Conflicts
In XML, element names are defined by the developer. This often results in a conflict when trying to mix XML documents from different XML applications.
This XML carries HTML table information:
| Apples | Bananas |
This XML carries information about a table (a piece of furniture):
If these XML fragments were added together, there would be a name conflict. Both contain a
| Apples | Bananas |
This XML carries information about a piece of furniture:
<table xmlns="https://www.Omegas.com/furniture“>
African Coffee Table
80
120
Namespaces in Real Use
XSLT is a language that can be used to transform XML documents into other formats.
The XML document below, is a document used to transform XML into HTML.
The namespace “http://www.w3.org/1999/XSL/Transform” identifies XSLT elements inside an HTML document:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform“>
My CD Collection
| Title</th> | Artist |
|---|---|
If you want to learn more about XSLT, please read our XSLT Tutorial.
❮ Previous Next ❯
