Fix XML header stripping

Fixes #89 
See current: http://3v4l.org/Md11E vs fixed: http://3v4l.org/eduNK