<?xml version="1.0" encoding="UTF-8"?> <!-- simple illustration of the definition of namespaces: all three tree elements are equal --> <trees-with-namespaces> <!-- Names of namespaces are short here for simplicity, but they should be unique long strings... --> <tree no="1" xmlns=""> <a xmlns="john"> <b xmlns="mary"> <c xmlns="mary">ghi</c> </b> <d xmlns="john"> <e xmlns="mary">jkl</e> </d> </a> </tree> <!-- xmlns declaration are inherited from the ancestors --> <tree no="2"> <a xmlns="john"> <b xmlns="mary"> <c>ghi</c> </b> <d> <e xmlns="mary">jkl</e> </d> </a> </tree> <!-- prefix declarations span the tree and simplify notation --> <tree no="3"> <a xmlns="john" xmlns:m="mary"> <m:b> <m:c>ghi</m:c> </m:b> <d> <m:e>jkl</m:e> </d> </a> </tree> </trees-with-namespaces>