robrighter/node-xml — pull request #23 by kruncher (2011-11-16 01:48:02+00:00)
Title: Allow detection of empty elements - Issue #22

I have added an additional parameter to callbacks `onBeginElementNS` and `onEndElementNS` so that empty elements can be detected when parsing.

For example:

```xml

```

The first `item` is called as follows:
```
onBeginElementNS('item', {}, null, null, [])
onEndElementNS('item', null, null)
```

The second `item` is called as follows:
```
onBeginElementNS('item', {}, null, null, [], true)
onEndElementNS('item', null, null, true)
```