added option to get xml document namespaces recursively