Oh boy, this is an old question. Seems the best solution is to search the input stream and replace with this special character sequence '#'. This did resolved my issue.
Thanks > ----- Original Message ----- > From: "Oscar Usifer" <oscaru...@programmer.net> > Subject: Input '&' symbol causing SystemID Unknown error > Date: Mon, 14 Sep 2009 17:14:33 -0500 > > > Folks, > > My input XML <entry></entry> values are containing '&' input > symbols, e.g. "...<entry>Texas A&M</entry>", which results in > errors as follows. I am reading the XML input from a SQL database, > and thus appear as input CLOBs, so no specification is being set on > the input charset. Any ideas how to resolve? > > Thanks, > OSC > > Reported Error: > > SystemId Unknown; Line #1; Column #5383; The reference to entity > "M" must end with the ';' delimiter. > > Source Code: > > public class ChatEncoder { > ... > public static void encodeHTML(Clob clob, Writer out) > throws SQLException, IOException, TransformerException, > TransformerConfigurationException > { > TransformerFactory tFactory = TransformerFactory.newInstance(); > StringReader sr = new StringReader(XSLT_RAW); > StreamSource ss = new StreamSource(sr); > Transformer transformer = tFactory.newTransformer(ss); > > transformer.transform( > new StreamSource(getClobReader(clob)), > new StreamResult(out)); > } > > ... > } > > -- > An Excellent Credit Score is 750 > See Yours in Just 2 Easy Steps! > -- An Excellent Credit Score is 750 See Yours in Just 2 Easy Steps!