# Active\_support/mini\_xml question/bug?

**URL:** <https://www.ruby-forum.com/t/active-support-mini-xml-question-bug/194014>\
**Category:** Rails\
**Created:** [August 27, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/active-support-mini-xml-question-bug/194014 "2010-08-27T23:33:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pitosalas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a4c791/32.png) [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Post date:** [August 27, 2010, 11:33pm UTC](https://www.ruby-forum.com/t/active-support-mini-xml-question-bug/194014/1 "2010-08-27T23:33:00Z")

</div>

Seems to me that {}.to\_xml is generating one level too many of xml  
structure, but I may be interpreting things incorrectly… I’ve reduced  
my question to a very simple case:

> > b  
> > =\> {“elist”=\>[{:element=\>1}, {:element=\>2}]}

> > puts b.to\_xml

\<?xml version="1.0" encoding="UTF-8"?\> 1 2 

Also with skip\_types:

> > puts b.to\_xml(:skip\_types =\> true)

\<?xml version="1.0" encoding="UTF-8"?\> 1 2 

There’s one too many levels of . Is this a bug or intentional?  
Is there a way to get it to remove that extra layer?

What I would like/expect the behavior to be is:

 1 2 

Thoughts?
