some character entities are now '? ' 2003-07-23 - By Elizabeth Barham
Hi,
I have a program that reads an XML configuration file, and in that file are various character entities. For example:
<pair from="Ò" to="&lsquo;"/>
This is used to translate a character value of 0xd2 in an input text stream into ‘ and I currently use a HashMap for translation.
The last time I used this program, in January 2003, it worked fine, but now for some reason Xerces, Java, or my program is not able to work with Ò and the resulting read-in character that my program sees is '?' (just a plain old question mark, 63, 0x3f).
Does anyone have any idea why this is occurring and have a method to correct it?
On a side note, this particular program reads in a text file and generates XML and I'm wondering what the best, less-coupled method for doing this is. As it stands, it just sends things like "<topic>x</topic>" to an output stream which works but I'd like the option of giving the output directly to another processor, say Xalan. Would it be better to pass an instance of an object that implements the ContentHandler interface around and have the classes call StartElement etc. on it? Or is there some better, often used method I've overlooked? It seems a waste to put the data into a stream when it can generate the SAX events itself.
Thank you, Elizabeth
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|