Leonidas-from-XIV/node-xml2js — pull request #113 by tsgautier (2013-12-06 01:55:25+00:00)
Title: Fixes xml strings that aren't closed

The parser never returns if given strings like "" when calling parseString() because the sax close() method was never called.

This fixes that by calling close on the sax write stream.

Note that the unit test that covers throwing an error synchronously was in my opinion actually wrong, since an error generated synchronously does and should bubble up immediately - so I flipped the logic of the unit test and added an appropriate comment.