users@jaxb.java.net

Handling Special Chars

From: Ranjith,R <send2r_at_gmail.com>
Date: Thu, 29 Sep 2005 10:08:52 +0530

Hi,
 I have an input coming in in valid XML format, sometimes it may contain
string messages as:
<msg>The good,the bad & the ugly</msg>
Now, we know any parser would reject this because of "&" - JAXB unmarshal
too fails.
 I wanted to know what should be the ideal approach or good practice in such
a scenario.
Scan the XML input and replace such special characters with entity refs?
 TIA
Ranjith