Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse multiple docs #3

Merged
merged 2 commits into from
Sep 8, 2017
Merged

Parse multiple docs #3

merged 2 commits into from
Sep 8, 2017

Conversation

mojodna
Copy link
Contributor

@mojodna mojodna commented Sep 8, 2017

This seeds the XML parser so that it can happily handle multiple docs (or multiple fully closed inputs), e.g. repeated <OsmChange /> fragments.

@gmaclennan
Copy link
Member

Looks good @Mojoda seems a little hacky, but doesn't seem to break any tests.
Looking at this module reminds me that I should rename it at some point to osm2obj.

@mojodna
Copy link
Contributor Author

mojodna commented Sep 8, 2017

Agreed, but the logic seems sound (end of doc == end of stream; don't end the doc, don't end the stream). Idea originally from isaacs/sax-js#205

@gmaclennan gmaclennan merged commit 3f4e239 into digidem:master Sep 8, 2017
@gmaclennan gmaclennan mentioned this pull request Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants