assistunion/xml-stream — Issue #4: $text missing in selected elements with no children
Author: dimituri
Created: 2011-10-19 01:02:42+00:00
State: open

Given input and code:

```xml

one
two

```

```javascript
var stream = require('fs').createReadStream('sample.xml');
var XmlStream = require('xml-stream');
var xml = new XmlStream(stream);
xml.on('updateElement: subitem', function(item) {
console.log(item);
});
```

It currently outputs:

```
{}
{}
```

But should output:

```
{ '$text': 'one' }
{ '$text': 'two' }
```