[XOM-interest] nu.xom.IllegalCharacterDataException: 0xc is not allowed in XML content

Marcus Downing marcus at minotaur.it
Tue Jun 10 20:06:17 EDT 2008


I'm getting:

nu.xom.IllegalCharacterDataException: 0xc is not allowed in XML content
...at nu.xom.Element.appendChild(Element.java:1069)

Text is pasted into a field on a web page, mostly from Word, and this
error is presumably the result of some bad data. I use UTF-8 across
the board, but most of the advanced characters I don't much care about
(non-breaking spaces and carriage returns can all just become spaces
for all I care).

What range of characters are "illegal"? Is there a reliable way I can
scan a string to remove illegal characters before appending it into an
Element? Or even better, can I control XOM's response to such
characters, so it removes them for me?

-- 
Marcus Downing
marcus at minotaur.it


More information about the XOM-interest mailing list