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 Elizabeth Barham <li...@soggytrousers.net> on 2003/07/23 11:58:51 UTC

some character entities are now '?'

Hi,

   I have a program that reads an XML configuration file, and in that
file are various character entities. For example:

      <pair from="&#xd2;" to="&amp;lsquo;"/>

This is used to translate a character value of 0xd2 in an input text
stream into &lsquo; 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 &#xd2; 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@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org