Giter Club home page Giter Club logo

xml-streamer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xml-streamer's Issues

Multi-bytes character sometime gets screwed up

Trying to parse xml file that contains multi-byte chars sometime results in a character being replaced with two invalid characters in text nodes (and potentially other).

The cause is probably the boundary of chunks when reading the file, that split a two (or more) bytes char.

new lines are stripped out from text

Parsing xml nodes that contains text with new lines results in a text with no new lines.

The cause seems to be that the processText function ignores fully blank strings.

However, the expat parser doc states that : "A single block of contiguous text free of markup may still result in a sequence of calls to this handler."
The expat code seems to break for new lines and for entities. So I suppose "blank" entities will also be lost.

What about a new parsing option to preserve all text ?

Release 2.0.0

Hey @Sai1919, thanks for taking care of the dependency updates. Would it be possible to release 2.0.0 on npm? This would help us getting rid of dependabot security issues.

Kind regards

pipe will not close input if root node is incorrect

When the root node is not matched, XmlStreamer will prematurely close. If using pipe, this leaves the input stream partially consumed and unclosed, requiring extra code for cleanup.

var file = fs.createInputStream('file_without_a.xml');
var streamer = new XmlStreamer({
    resourcePath: '/a'
});
file.stream(streamer);
// extra code required to close file in case the root tag did not match

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.