# xml_safe_checker

> XML safe checker

Latest version **1.0.55** (published 2023-01-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install xml_safe_checker
pnpm add xml_safe_checker
yarn add xml_safe_checker
bun add xml_safe_checker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.55 |
| Published | 2023-01-01 |
| First published | 2016-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 53.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kgregor |

## Links

- npm: https://www.npmjs.com/package/xml_safe_checker
- npm.io page: https://npm.io/package/xml_safe_checker

## Dependencies (2)

- [util](https://npm.io/package/util.md) ^0.10.3
- [stream](https://npm.io/package/stream.md) 0.0.2

## Recent versions

- 1.0.55 (latest) — 2023-01-01
- 1.0.54 — 2023-01-01
- 1.0.44 — 2018-06-25
- 1.0.43 — 2018-06-25
- 1.0.42 — 2018-06-25
- 1.0.41 — 2016-07-01
- 1.0.40 — 2016-05-31
- 1.0.38 — 2016-05-31
- 1.0.37 — 2016-05-31
- 1.0.35 — 2016-05-30
- 1.0.34 — 2016-05-30
- 1.0.33 — 2016-05-30
- 1.0.32 — 2016-05-29
- 1.0.31 — 2016-05-29
- 1.0.3 — 2016-05-29
- … 3 more at https://npm.io/package/xml_safe_checker/versions

## README

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 <a href="http://kgregor.si/other/donate.html">making a donation</a>!

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'.
<br><br>
<i>var streamer = new saxpath.SaXPath(saxParser, '/books/book' );</i><br>
<br>
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.
<br><br>
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.

---
_Source: https://npm.io/package/xml_safe_checker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
