.xml将换行符添加到文本元素

时间:2018-08-02 20:31:15

标签: xml

已解决-& lt; BR & gt;终于对我有用。 (在&和lt或&和gt之间没有空格,无法弄清楚如何正确格式化。)

我正在处理xml文件,并尝试格式化将以电子邮件形式发送的消息。电子邮件已发送,但是只有一行。使用换行符更容易阅读,至少客户希望它具有换行符。我无权访问关联的Java代码,因此需要在.xml文件中进行更改。

有问题的元素写为

<WARNING interval="1" period="80" message="Your account has not been used recently and will be disabled in XX days if you have not logged in. If you believe this message is in error please contact the help desk (1-800-555-1212). and ask that the incident be assigned to group Account_Group." subject="Account Suspension Warning."/>

时间间隔是电子邮件之间的天数,期间是自使用帐户以来的天数,消息是要包含在发给客户的电子邮件中的文本。

我在Adding a new line/break tag in XML上查看并尝试了大多数建议。 (我找不到重复的问题/帖子。)

!CDATA给我一个错误:     Fatal Error: Parsing error on line 236 col=9 The value of attribute "message" associated with an element type "null" must not contain the '<' character.

&lt; br/ &gt; just puts
`进入电子邮件消息

其余建议无济于事。

0 个答案:

没有答案