O'Reilly logo

Sams Teach Yourself XML in 10 Minutes by Andrew H. Watt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Namespaces in XML

To clearly distinguish the order element here you would need to provide more information about the element type name than simply order:

<order> 
 <givenBy>General B. Smart</givenBy> 
 <Content>Relocate 6 jet fighters to MacDill Air Force 
  Base</Content> 
</order> 

from the order element here

<order> 
 <Location>Seattle</Location> 
 <Description>A riot lasted several hours following clashes 
  with anti-globalization protesters. 
</order> 

The solution to this, in XML 1.0, is a qualified name. This is often abbreviated as QName.

A qualified name is an XML element type name that consists of two parts—a namespace prefix and a local ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required