You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Mark Sizer <mr...@cybercrop.com> on 2001/03/19 23:05:29 UTC
entity reference help, please!
I've spent all day trying to find out how to replace characters with entity
references and have had no luck. I don't even want to use custom entity
references, just &, <, and > so the parser won't choke reading what
I'm outputting.
One would think that the Text node setText/getText methods would take care
of it (or at least throw an exception if you give it characters that will
break the parser), but it doesn't.
How do I convert a Java String from raw characters to an XML-safe
representation?
Thanks for any help,
Mark R. Sizer,
CyberCrop.com
P.S. Is this as easy as I think it should be and I'm just really stupid
today? Meanwhile, I'm going to write the code myself.