maik / xml-simple

Easy API for working with XML documents
MIT License
88 stars 27 forks source link

Content must be a string? #15

Closed bootstraponline closed 9 years ago

bootstraponline commented 9 years ago

I noticed that unless content is a string, it's treated as an attribute. Is this a bug or a feature?

[13] pry(main)> XmlSimple.xml_out({y: {'content' => 'one'} })
=> "<opt>\n  <y>one</y>\n</opt>\n"
[14] pry(main)> XmlSimple.xml_out({y: {content: 'one'} })
=> "<opt>\n  <y content=\"one\" />\n</opt>\n"