Configurable Object to XML Converter for Node.js
Support this website by purchasing prints of my photographs! Check them out here.I just got my configurable Object to XML Node.js Converter uploaded to GitHub. The goal of the project is to make it easy to generate your response object in your API once, and then depending on the request accept header, either send the raw object or use this to convert that object into XML.
Without this module, you would either have to use a generic XML generator (which usually have some interesting side effects with naming), or manually create your XML object in every action (which is annoying). You can configure the module for your entire project if you use consistent settings (which is most likely what you'll want to do), or you can do it each time you generate an XML document.
The biggest feature IMO is that it generates plural element names for arrays, with each child being a singular element name, e.g.:
<objects>
<object />
<object />
<object />
</objects>
Note, this project isn't hosted in my GitHub account, but as a project under the organization for the company I currently work at.