Connecting Tech Pros Worldwide Help | Site Map

basic xml

  #1  
Old August 12th, 2008, 08:05 AM
Tony Johansson
Guest
 
Posts: n/a
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


  #2  
Old August 12th, 2008, 12:15 PM
Martin Honnen
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some very basic xml Tony Johansson answers 4 August 12th, 2008 01:15 PM
basic XML reading question Newbie answers 2 July 31st, 2008 12:15 PM
Basic XML file creation / editing Sam Collett answers 8 November 16th, 2005 11:50 PM
Basic XML File Creation / Editing sam.collett@gmail.com answers 1 November 12th, 2005 04:28 AM
*Very* basic XML/XSL question... Tom answers 9 July 20th, 2005 07:57 AM