Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Could saxpath be duplex stream, on top of emitting 'match' events? #10

@rprieto

Description

@rprieto

Maybe a basic question, but is there a reason saxpath is a writable stream only, and emits a match event? It would be nice if it was a Duplex stream, and we could also do:

var fileStream = fs.createReadStream('test/bookstore.xml');
var saxParser  = sax.createStream(true);
var streamer   = new saxpath.SaXPath(saxParser, '//book');

fileStream.pipe(saxParser).pipe(process.stdout);

Or of course, pipe into something more complex than stdout, like a JSON->XML transform stream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions