Parse XML according to the "Spark" convention (


Node-SparkXML is a a simple Node.js-based XML parser. It parses according to the "Spark" convention, which is a slight modification of the "Parker" convention.

The Spark convention is a slight modification of the Parker convention. It treats nested child elements as demarcating the beginning of an array if there is only one kind of child (a repeating element)… Parker almost does this, but if there is only one child in the container, it doesn't think it should be an array. The Spark convention ensures that child is always an array even if there's only one of them.

More info can be found at:

This library was mainly developed for tools around Open311, which uses the Spark convention, but it could be useful in plenty of other cases.

Copyright (c) 2012-2013 Code for America. See LICENSE for details.

Thanks to Oiva Eskola for additional contributions.