Missing support for "xml:" namespace added

Based on a patch I wrote in May 2012. It worked satisfactory back then. Requires additional testing before merging into 3.4 though.