Connecting Tech Pros Worldwide Forums | Help | Site Map

basic xml

Tony Johansson
Guest
 
Posts: n/a
#1: Aug 12 '08
Hello!

I'm reading a book and I'm trying to learn the very basic about xml.

Can somebody give me an explanation why namespace are used in xml
perhaps with a simple example that demonstate the usefulness.

//Tony



Martin Honnen
Guest
 
Posts: n/a
#2: Aug 12 '08

re: basic xml


Tony Johansson wrote:
Quote:
Can somebody give me an explanation why namespace are used in xml
perhaps with a simple example that demonstate the usefulness.
If there were no namespaces then you could not mix different XML
vocabularies as you could not distinguish for instance the XHTML 'table'
elment from a 'table' element in another vocabulary. Using namespaces
the complete name of the XHTML 'table' element is
{http://www.w3.org/1999/xhtml}table where the URL
'http://www.w3.org/1999/xhtml' provides the globally unique context for
the local name 'table'. And any {http://example.com/foo}table is
different from that.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Closed Thread