# Save XML formatted with tabs instead of spaces?

**URL:** <https://forum.kirupa.com/t/save-xml-formatted-with-tabs-instead-of-spaces/328764>\
**Category:** flash\
**Created:** [June 14, 2012, 2:14pm UTC](https://forum.kirupa.com/t/save-xml-formatted-with-tabs-instead-of-spaces/328764 "2012-06-14T14:14:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![e\_v](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/e_v/32/7787_2.png) [@e\_v](https://forum.kirupa.com/u/e_v)\
**Post date:** [June 14, 2012, 2:14pm UTC](https://forum.kirupa.com/t/save-xml-formatted-with-tabs-instead-of-spaces/328764/1 "2012-06-14T14:14:15Z")

</div>

I’m creating some XML and saving it to a file via FileStream, but the child nodes are indented with 2 spaces. How can I reformat with tabs instead? I’m trying to write a recursive function to go through the xml and build the string I want, but then my question is: If I had the following XML…

```auto
<name>
  <first>Lisbeth</first>
  <last>Salander</last>
</name>

```

… how do I get the string “\<first\>Lisbeth\</first\>” instead of getting “Lisbeth”?
