Creates an Xml NamespaceManager for an XML document by looking at all of the namespaces defined on the document root element.