line breaks in attributes 2003-02-11 - By Hui Cai
Very clear. Thanks!
-----Original Message----- From: Andy Clark [mailto:andyc@(protected)] Sent: Thursday, February 06, 2003 12:34 PM To: xerces-j-user@(protected) Subject: Re: line breaks in attributes
Hui Cai wrote: > When I call the getAttribute(String), it converts any line > breaks to a white space. Is there a way the line breaks can > be preserved?
Make your attribute type CDATA *and* embed the line breaks in your attribute content as character entity references. For example:
Also, if you write directly to XNI, Xerces can give you the non-normalized attribute value in the XMLAttributes inter- face. But be careful when choosing this route since it will add a dependency on the Xerces parser (until other parser implementations adopt XNI ;).
-- Andy Clark * andyc@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
----+---- This email message (and any attached document) contains information from Ingenuity Systems Inc. which may be considered confidential by Ingenuity, or which may be privileged or otherwise exempt from disclosure under law, and is for the sole use of the individual or entity to whom it is addressed. Any other dissemination, distribution or copying of this message is strictly prohibited. If you receive this message in error, please notify me and destroy the attached message (and all attached documents) immediately.
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|