Friday, March 4, 2011

Default Handler implementation breaking on nbsp

I have an implementation of default handler. When it gets to a   in the character data it stops parsing. Is there any reason that it is doing this? Are there additional properties that I need to set in order for it to deal with &nbsp?

From stackoverflow
  •   is not a valid xml entity. You might try replacing it with   instead, it does the same thing (non-breaking space).

    Knoth23 : It breaks/stops parsing on   as well.
  • This breaks because the XML entity is not defined. You could add

    <!DOCTYPE document  SYSTEM "document.dtd" [ 
    <!ENTITY nbsp "&#160;"> 
    ]>
    

    Or just use &#160; instead. (Note the ";" at the end)

    Also see here.

0 comments:

Post a Comment