# How to give spaces(gap between lines) for Text while writing to XML nodes

**URL:** https://www.finalbuilder.com/forums/t/how-to-give-spaces-gap-between-lines-for-text-while-writing-to-xml-nodes/2163
**Category:** Discussion
**Created:** [June 14, 2013, 2:49am UTC](https://www.finalbuilder.com/forums/t/how-to-give-spaces-gap-between-lines-for-text-while-writing-to-xml-nodes/2163 "2013-06-14T02:49:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [June 14, 2013, 2:49am UTC](https://www.finalbuilder.com/forums/t/how-to-give-spaces-gap-between-lines-for-text-while-writing-to-xml-nodes/2163/1 "2013-06-14T02:49:12Z")

</div>

Hi All,

We have a task like we need to write text message to&nbsp;existing XML node.

Our XMl is in below format

\<?xml version="1.0"?\>

&nbsp;

Now what we need to do is we need to write below text b/w lines as it is(with spaces between each line)&nbsp;in the node&nbsp; in

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Hi All,  
  
Welcome to our team.

Regards,  
Team

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

&nbsp;

&nbsp;

For that what we are doing is we are&nbsp;Using **Edit XML File&nbsp;** Action&nbsp;, we had given correct **XPath** and in the **New Value** we are giving our required text(as mentioned above)

We had tried 3 different options provided there for **New Value** like **Treat new value as text,Preserve white space,insert value as CDATA** but while writing to XML it is writing as below

&nbsp;

&nbsp;--------------------------------------------------------------------------------------------------------------------------------------------------------------

**Hi All,Welcome to our team.Regards,Team**

--------------------------------------------------------------------------------------------------------------------------------------------------------------

&nbsp;

Means it is not taking spaces betwenn lines ,but we want it to write as it is to XML.

Please provide some help regarding this.

**One more case :**

We have a varaible %history% which has 4&nbsp;lines of data.When writing to XML using same steps as above ,that variable value is also not written properly, it is writing as a single line.

&nbsp;

Please help us in the two tasks mentioned above.

&nbsp;

Thanks

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![mahendra](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/m/779978/32.png) [@mahendra](https://www.finalbuilder.com/forums/u/mahendra)
#### Post date: [June 14, 2013, 3:10am UTC](https://www.finalbuilder.com/forums/t/how-to-give-spaces-gap-between-lines-for-text-while-writing-to-xml-nodes/2163/2 "2013-06-14T03:10:10Z")

</div>

I also has a similar task as mentioned above . Can some one help me.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [June 16, 2013, 3:38am UTC](https://www.finalbuilder.com/forums/t/how-to-give-spaces-gap-between-lines-for-text-while-writing-to-xml-nodes/2163/3 "2013-06-16T03:38:35Z")

</div>

I'm not able to reproduce this here. I have attached an example project which show it working with FB7.
