[EMAIL PROTECTED] wrote:
> 
> Along the same lines.. I have been loading well formed HTML (XHTML?)
> document
> 
> <html>
> <body>
> &nbsp;
> </body>
> </html>
> 
>  using
> 
> javax.xml.parsers.DocumentBuilderFactory dbf=
>             javax.xml.parsers.DocumentBuilderFactory.newInstance();
> javax.xml.parsers.DocumentBuilder db= dbf.newDocumentBuilder();
> 
> org.w3c.dom.Document doc = db.parse("C:\somefile.html");
> 
> but I get a SAXException on &nbsp; basically telling be that this entity is unknown?
> 
> Is there a way to fix that (instead of using &#160;)? Should I point to a specific 
>DTD? Is that efficient?

"nbsp" is not a predefined entity in XML so you must define it on your
own in your DTD or use the character entity you point out.

-Edwin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to