There's another possibility. There are certain characters ( &, < , >, ", and ') that when found within a tag pair will cause the parser to choke and report the 'whitespace' error. If you have these characters, here's the substitutions that need to be made:
& --> replace in XML with --> &
< --> replace in XML with --> <
> --> replace in XML with --> >
" --> replace in XML with --> "e;
' --> replace in XML with --> '