1.0.55 • Published 1 year ago

xml_safe_checker v1.0.55

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

XML safe checker


This stream module was written to avoid out of memory errors, when working with very large XML elements with 'saxpath' stream module or other ones. For XML safe checker module, we specify max. amount of bytes, that would be contained inside choosen element. XML safe checker is transform stream type, which throws error when element's and it's subelement's size exceeds. This module, while runs, occupies very little memory.

Note

New functionality: you can check for many XML element names with one transversal of stream. This module is being frequently updated and newly found errors/bugs will be fixed as soon they are discovered.

Donate

My income consists of donations for my projects. If this module is useful to you, consider making a donation!

You can donate using PayPal or Wire transfer.

Usage with 'saxpath' module

With next code, 'saxpath' will retreve all XML elements, named 'book', that are contained inside root element 'books'. var streamer = new saxpath.SaXPath(saxParser, '/books/book' ); If you have other elements beside 'book' inside XML file, that are very large, there would be no problem with them. 'Saxpath' will simply skip them, stream's behaviour will be non-blocking and while skipping ones, not being 'book', will not use memory. Problem could be, when there is 'book' element that is very large. Here out of memory error could be thrown. Here comes in play 'XML safe checker' module. While running together with 'saxpath' stream (piped), we check our XML file with 'XML safe checker' and if it doesn't throw error, then content is not too large.

Example

Please see 'example' subfolder, included with module. It demonstrates usage togeter with saxpath XML parser.

1.0.55

1 year ago

1.0.54

1 year ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.41

8 years ago

1.0.40

8 years ago

1.0.38

8 years ago

1.0.37

8 years ago

1.0.35

8 years ago

1.0.34

8 years ago

1.0.33

8 years ago

1.0.32

8 years ago

1.0.31

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago