Mega Code Archive

 
Categories / XML Tutorial / Namespace
 

Default Namespaces

A  default namespace is like a regular namespace. You don't have to specify a prefix for all of the elements that use it.  <person xmlns="http://www.rntsoft.com">      <name>          <title>Sir</title>      </name>  </person>  You can declare more than one namespace for an element, but only one can be the default.  <person xmlns="http://www.rntsoft.com"          xmlns:xhtml="http://www.w3.org/1999/xhtml">      <name/>      <xhtml:p>This is XHTML</xhtml:p>  </person>