亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在具有自定義標簽的 xml 中添加新行?

如何在具有自定義標簽的 xml 中添加新行?

繁星淼淼 2023-04-26 13:36:04
我正在開發一個離線故事 android 應用程序。但它有一個非常大的問題。每當我在故事中添加一個段落但所有文本都在混合時。我的意思是段落沒有顯示。請參閱說明中的圖片以正確理解。示例 XML 代碼:<root>  <story_id>1</story_id>    <story_title>Half of the Profit</story_title>    <story_date>25/07/2017</story_date>    <story_des>A rich man wanted to give a great feast to his friends. He got all kinds of dishes prepared but he could not get fish. He offered a reward to the man who would bring it. After some time a fisherman brought a big fish.        But the gate keeper would not let him in till he had promised to give him half the reward.    The fisherman agreed. The rich man was highly pleased and wanted to give him a lot of money, but the fisherman refused to take it. Instead, he demanded a hundred lashes on his back. All were surprised. At last the rich man ordered a servant to give him a hundred lashes.        When the fisherman had received fifty, he asked them to stop as he had a partner in the business.    It was the gatekeeper. The rich man understood the whole thing. He was given the remaining fifty lashes dismissed from the service. The rich man gave the fisherman a handsome reward.   </story_des></story>                                                              </root>輸出:它在應用程序中的外觀截圖
查看完整描述

1 回答

?
白豬掌柜的

TA貢獻1893條經驗 獲得超10個贊

使用<p>標簽創建一個新段落,如下所示:


<root>

  <story_id>1</story_id>

    <story_title>Half of the Profit</story_title>

    <story_date>25/07/2017</story_date>

    <story_des>

        &lt;p&gt;A rich man wanted to give a great feast to his friends. He got all kinds of dishes prepared but he could not get fish. He offered a reward to the man who would bring it. After some time a fisherman brought a big fish.&lt;/p&gt;

        &lt;p&gt;But the gatekeeper would not let him in till he had promised to give him half the reward.&lt;/p&gt;

        &lt;p&gt;The fisherman agreed. The rich man was highly pleased and wanted to give him a lot of money, but the fisherman refused to take it. Instead, he demanded a hundred lashes on his back. All were surprised. At last the rich man ordered a servant to give him a hundred lashes.&lt;/p&gt;

        &lt;p&gt;When the fisherman had received fifty, he asked them to stop as he had a partner in the business.&lt;/p&gt;

        &lt;p&gt;It was the gatekeeper. The rich man understood the whole thing. He was given the remaining fifty lashes dismissed from the service. The rich man gave the fisherman a handsome reward.&lt;/p&gt;

   </story_des>

</story>                                                              

</root>


查看完整回答
反對 回復 2023-04-26
  • 1 回答
  • 0 關注
  • 120 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號