Updated code which prevents adding an undefined XML namespace in the XML's
child xmlns attribute to use the identity operator (===).