Как иметь разрывы строки в атрибутах XML?

Ctrl + K , Ctrl + D - Формат текущий документ.

Помог мне зафиксировать добавление отступа и удалить ненужные пробелы быстро

11
задан Deduplicator 10 February 2015 в 22:36
поделиться

3 ответа

Basically you want to insert CRLF:

CR code:
LF code:

<myelement description="line1&#13;&#10;line2&#13;&#10;line3"/>
20
ответ дан 3 December 2019 в 05:58
поделиться

If you need it in XML attribute, you'll have to use character entities:

<element attribute="First line&#10;Second line&#10;Third line..." />
5
ответ дан 3 December 2019 в 05:58
поделиться

Try it like this:

<description><![CDATA[first line<br />second line<br />]]></description> 

Basically you wrap the content within your tag inside "" for the closing tag, inbetween this tag you can use
to cause a line break. If you want to double space it, use two
like this:

Hope this helps.

-5
ответ дан 3 December 2019 в 05:58
поделиться
Другие вопросы по тегам:

Похожие вопросы: