I use Builder :: XmlMarkup to create XML data structures for a RESTful API server.
Recently, I found an error where the pretty-printed version from Builder :: XmlMarkup created an element filled with white space instead of an empty element, as it should be.
For example, this code:
xml.outertag do
xml.list do
end
end
produces:
<outertag>
<list>
</list>
</outertag>
When the internal list is an empty list, the element must be empty - <list / "> or <list> </list>. However, the actual XML is the <list> tag, filled with a new line and other spaces.
, Builder? Builder:: XmlMarkup, : indent; after_filter.