# Maching input and output xmlsimple

**URL:** <https://www.ruby-forum.com/t/maching-input-and-output-xmlsimple/74947>\
**Category:** Ruby\
**Created:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/maching-input-and-output-xmlsimple/74947 "2006-11-07T11:03:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hborda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@hborda](https://www.ruby-forum.com/u/hborda)\
**Post date:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/maching-input-and-output-xmlsimple/74947/1 "2006-11-07T11:03:33Z")

</div>

I’m using xmlsimple to change values opn configurations files and it  
works great! My only problem is that XMLout does not match my input  
xml file format. Does anybody has any advise?

Thanks Hugo

---

<div class="post-metadata">

**Author:** ![hborda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/90ced4/32.png) [@hborda](https://www.ruby-forum.com/u/hborda)\
**Post date:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/maching-input-and-output-xmlsimple/74947/2 "2006-11-07T11:03:37Z")

</div>

hborda wrote:

> I’m using xmlsimple to change values opn configurations files and it  
> works great! My only problem is that XMLout does not match my input  
> xml file format. Does anybody has any advise?

If you’re using xmlsimple in the first place, odds are the format of  
your document isn’t semantically significant. Xmlsimple lets you pick a  
string with which to indent a level of the tree in the output, but  
that’s it - your original formatting is lost when you read the document.  
For what it’s worth, the output of xmlsimple looks like fairly standard  
fare, is there anything in specific you don’t like about it? Massaging  
the XML file with a beautifier (e.g. [http://www.digital-mines.com/htb/](http://www.digital-mines.com/htb/))  
after writing it out might help.

David V.
