sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Tony Johansson's Avatar

basic xml


Question posted by: Tony Johansson (Guest) on August 12th, 2008 08:05 AM
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


1 Answer Posted
Martin Honnen's Avatar
Guest - n/a Posts
#2: Re: basic xml

Tony Johansson wrote:
Quote:
Originally Posted by
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/
 
Not the answer you were looking for? Post your question . . .
196,987 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,987 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors