Xiao Yang wrote:
Ok, I think I know what's going on here. The illegal
characters are apos and quotes. I am generating a xml
document from a text field in sql server. I am using
the JDBC driver from microsoft to get it. the driver
probably does not know how to copy apos and quotes and
replace them with these illegal xml characters (x19,
xc1).  my questions now becomes how can I look for and
replace these illegal xml characters in the xml
document. I am using the xerces parser from apache. Is
there a way for the parser to pick up on these illegal
characters?

I'd try to replace the characters before they are fed into the parser. Are you getting a string containing the XML from the driver? Or some string data? Use replace() on this string.

BTW U+00C1 is a valid XML character.

J.Pietschmann



Reply via email to