line breaks in attributes 2003-02-06 - By Andy Clark
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)
|
|