namespace-aware extraction of XML elements