You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Dave Hoffer <DH...@xrite.com> on 2002/02/18 15:16:27 UTC

Xerces-C & excape sequences

I am quite new to the Xerces parser.  We use the SAX parser to process
all of our string resources using in our application (we store all
strings in XML file(s)).  Sometimes we want to include carriage return
(CR) and line feed (LF) characters in our strings so they can be
properly displayed.

Since we get our XML strings originally from the RC file...it may
contain escape sequences (\r & \n).  The problem is that the SAX parser
does not treat these as escape sequences, but rather as text.  What is
the best way to treat these as escape sequences?

*	Is there a way I can tell the parser to do this for me?  (This
would seem to be ideal.)

*	Or...should I code this conversion manually after the SAX parser
is finished?

*	Or...should I code the conversion when I go from RC files to the
original XML?  We always encode the XML as UTF-16...I guess there is a
way to embed 0x000A & 0x000D in the XML data...but since we want our XML
files to be easily translated using a text editor...this might be quite
confusing.  I.e. what translator will know that 0x000A & 0x000D are CR &
LF?

Any ideas or suggestions would be appreciated.

-dh

 

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org