How to have line breaks in XML attributes?
问题 I have a attribute called: description and I want to have the following in it with new lines: This is the content description section. Download instruction: This is the contents on how to download contents. Hotline support: This is the hotline for contents. How do I create a new line for it in xml? 回答1: Basically you want to insert CRLF: CR code:
LF code:
<myelement description="line1
line2
line3"/> 回答2: If you need it in XML attribute , you'll have to use character entities: <element