Minor fixes for namespace and CDATA support

I am not saying this is the right way to do fix these issues. They're also missing tests. However, please do address these issues.