Chapter 5. Putting Namespaces to Use

 

Namespaces and whitespace; anything that ends with “space” in XML is a pain in the butt.

 
 --Jason Hunter

Although it’s true that namespaces have caused their fair share of confusion in the XML community, they nonetheless represent a reasonable solution to a tricky problem that is inherent in XML. As you know, XML allows you to create custom markup languages, which are languages that contain elements and attributes of your own creation. XML is incredibly flexible in this regard, but there is nothing stopping two people from creating markup languages with very similar, if not identical, elements and attributes. What happens if you need to use both of these markup languages in a single document? There would obviously ...

Get Sams Teach Yourself XML in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.