Allow detection of empty elements - Issue #22 #23

Merged
merged 1 commit into from Sep 14, 2012

2 participants

@kruncher

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

For example:

<list>
    <item><item>
    <item />
</list>

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)
@robrighter robrighter merged commit be66f7d into robrighter:master Sep 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment