RE: important

Khurram Majeed wrote:

> consider this html 

>   <body> 
>       <p><font face=verdana size=3>Checking</font></p> 
>       <p>&nbsp;</p> 
>   </body> 

OK.

> Now, when i use tidy to convert this html to xml, 

What do you mean?  Do you mean generic XML, or XHTML?

> the resultant xml is 
>   <html> 
>     <body> 
>        <p><font face="verdana" size="3">Checking</font></p> 
>        <p>&nbsp;</p> 
>     </body>
>   </html>

> Now when this xml is viewed in Internet Explorer 5..the
> following error comes error : cannot identify &nbsp; at
> <p>&nbsp;</p> 

Your "XML" looks suspiciously like HTML or XHTML. ...

I'll take a guess -- your resultant filename is something like
"myfile.xml", and there is no DOCTYPE declaration?

If that's the case, what do you expect?  Generic XML only knows about
four "built-in" entities:  &lt;, &gt;, &quot;, and &amp;.  Now you're
throwing it one it's never heard of: &nbsp;!

> so what should i do then...how should i avoid this error. 

You haven't been clear about what you're trying to do.  *Why* have you
given your file a .xml extension (if that's the case!)?  What are you
trying to do with it?

If you really want it to be .xml, then make sure it references a DTD
where nbsp is declared (like, say, one of the XHTML DTDs. :).


/Jelks

Received on Sunday, 3 March 2002 17:59:39 UTC