buglabs/node-xml2json — pull request #21 by finik (2012-07-06 00:59:26+00:00)
Title: Fix json2xml bug causing broken xml under some conditions

When JSON object has both string elements and child objects, depending on the order, properties that are listed after the child would be added to the closing tag of the child. Example:

... { child: {child_property: 'foo'}, parent_property: 'bar' } ...
will result in:
......

The fix may not be the most optimal one, but works: first handle all strings
in the object and add them as properties, then do a second pass and handle arrays and nested child objects.