fixed bugs about xmlDoc to Str