I've personally only used the namespace support using XMLIn, but the docs specify that NSExpand works on XMLOut, as well. Did you properly set the xmlns attribute for the tag? That's the only way it will work, I guess.
Re: CDATA, I'm not sure about writing, I actually moved to xml::libxml for writing because it was easier.