Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whitespace required

Status
Not open for further replies.

roycet

Technical User
Aug 3, 2000
9
0
0
US
The DOM processor keeps giving me the error "Required whitespace was missing." Any ideas as to what this means? I get this error whenever I try to validate an XML doc against a DTD. Any ideas?

-Tom
 
Tom,

> Any ideas?

Yes, I have three:

1) The error message could be correct.
2) The error message could be incorrect.
3) You could post the pertinent parts of the XML and DTD files so that someone might be able to help you.

"But, that's just my opinion... I could be wrong".
-pete
 
There's another possibility. There are certain characters ( &, < , >, &quot;, 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 --> &amp;
< --> replace in XML with --> &lt;
> --> replace in XML with --> &gt;
&quot; --> replace in XML with --> &quote;
' --> replace in XML with --> &apos;
 
without the auto processing of this site (=spaces between each character ;-)) that might read ...

& --> replace in XML with --> & a m p ;
< --> replace in XML with --> & l t ;
> --> replace in XML with --> & g t ;
&quot; --> replace in XML with --> & q u o t e ;
' --> replace in XML with --> & a p o s ;

but i must agree with palbino - you must help others to help you. pass as much information as possible when posting a question but[b/] remember to include only those snippets of pertinent code.
m Mark Saunders :)
 
Thanks Mark,

I clipped the substitutions out my Word document and didn't notice that the control characters got stripped out... I'll keep that in mind the next time.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top