Parsing XML CDATA with Xmllite

人盡茶涼 提交于 2019-12-12 01:16:58

问题


The issue:
When readin CDATA elements, carriage return (0xD) are omitted from the output.

Is there a proper way to tell Xmllite to keep CR,
or should I always need a Replace(LF,CRLF) call?

Thanks I.A


回答1:


This behaviour (replacing 'carriage return, line feed' with 'line feed') is required by any conforming XML parser (section 2.11 of the xml 1.0 spec: http://www.w3.org/TR/REC-xml/#sec-line-ends). If you want both control characters in your output you will need to add the carriage return to the string after parsing.



来源:https://stackoverflow.com/questions/1437874/parsing-xml-cdata-with-xmllite

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!