{"_id":"@trysound/sax","_rev":"3-106b478cdba67ad5aed45a7494d36943","name":"@trysound/sax","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"version":"0.1.0","name":"@trysound/sax","description":"An evented streaming XML parser in JavaScript","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git://github.com/svg/sax.git"},"license":"ISC","contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru","url":"http://github.com/TrySound"}],"main":"lib/sax.js","engines":{"node":">=10.13.0"},"scripts":{"test":"tap test/*.js --cov -j4","lint":"standard -F test/*.js lib/*.js"},"devDependencies":{"standard":"^8.6.0","tap":"^10.5.1"},"gitHead":"7311a50f04f52cdafdf2d593cbbbe78964afaa4b","bugs":{"url":"https://github.com/svg/sax/issues"},"homepage":"https://github.com/svg/sax#readme","_id":"@trysound/sax@0.1.0","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-1yH66Pny121c7ZwLW/zLedcflwPHELEg4pMo6pA+U1PoEKt8hUI6SKD47mfAJhC+4IExoEr0tMTYETlhpjPhmQ==","shasum":"a06f11b605789c38510d71aa5370d76ba25cdfc6","tarball":"https://registry.npmjs.org/@trysound/sax/-/sax-0.1.0.tgz","fileCount":4,"unpackedSize":48308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNMl4CRA9TVsSAnZWagAAkkEP/1y1DY5URZMOm6hn7Dl4\naaE8j4zIKZNJmaqK/FaOghVngN3PqUuji0TJ8VXOGoUoJriiJiRDFTovgCdt\nGts5oSMzt1Nxaa7maNjR6HWERwFHd4pBIOFFmqYQhHuSLHE0zmM4KSA2exCS\nLwX8LneQ9aBoukhYpE+TnbB7kBbRSMb9OWSrd0MaCM1Ykhn/SO1//yHMNSB+\nRvk7LdpLYILVtSvquL7i0o2JyAI2lrs0mUJj53brqwtgE7+x7oss8ZlLW+Mp\nmdj4DHOrMawQlb2vx6+6R1B+lQHyKfYvxWdOLzMjVrMS4ZW0gBSE6RKHdZrd\nIIABnAHMopHdsOtqBioeXN+uHG/uFZU6J7wiHMXM/A4DVH0jOU45P/XgktCK\nWfJljESGWgez3uAUFhStH0Qbffa9NfexwmJSPlIVuI7wxKQymyqgw+BwrBo7\nAIPCWHXSdd3BiNN8gnl7w7BSNM9imScft8LWxK3GQ3Dk7LNq56VBG/y5qF8p\ney5OL+J5/+GEEyPlIff5DBQcHziH8gOF3AhlHQABIMGx+RF95OLP0EUgF4VL\nFF8AAFud+zjTZ0zU1qnT6SBi65KgijpZXG7oNKIAjOCfrtc+yS5wVJOGxRgs\nKeYhDbe9VSrahtCPh+HUCdNW1juBL9uFhdETuhWCVIiSW+r9k7w0ebzG+ZNj\nI+sP\r\n=Q4KW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDR6TWQMXgWSjTjDkLP6PVaq/xPVfChZePwFnd8fsHxQIhAL2v5JW3tKvBQo2PahW0nTCnPFVdA8R7EZt3JxenrwYT"}]},"_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"directories":{},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sax_0.1.0_1614072183659_0.6507112423573544"},"_hasShrinkwrap":false},"0.1.1":{"version":"0.1.1","name":"@trysound/sax","description":"An evented streaming XML parser in JavaScript","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git://github.com/svg/sax.git"},"license":"ISC","contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru","url":"http://github.com/TrySound"}],"main":"lib/sax.js","engines":{"node":">=10.13.0"},"scripts":{"test":"tap test/*.js --cov -j4","lint":"standard -F test/*.js lib/*.js"},"devDependencies":{"standard":"^8.6.0","tap":"^10.5.1"},"gitHead":"60b84399d6a6e62a8af6d0dc351e9775ad5a4434","bugs":{"url":"https://github.com/svg/sax/issues"},"homepage":"https://github.com/svg/sax#readme","_id":"@trysound/sax@0.1.1","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==","shasum":"3348564048e7a2d7398c935d466c0414ebb6a669","tarball":"https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz","fileCount":4,"unpackedSize":48683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNTRtCRA9TVsSAnZWagAA1v8P/jPmMylLT2qIsl8bXFVY\nyxDXF39dccL1rMiNbMbnIP6OXgYVx5Z1cGm7ARpjXbt+jqeVnQcSSEy4DtxG\ni+HD5Q9wDZHMoONiymv2rgnT8jRN0hx+U18wBQC2Jr2A/hNOEYdBHOmsPtWb\no23IKAxVdDUU/rh4Mfpg6xjhgm7I9mUNfGIiiyVl6yniSr0XOHtKd1T9EfIA\nTxG3YL3LMCpAn0ztJosrdYlvTT0TPoZgPpj255rAZRrbfqDRQv6vjXdpy6Bv\nz/7jcH7JVJ79OVIqPNm29gPvUyH1tpUGCQB1jKTv2bkP45r1dx7wq87eOTUr\nrKY9z4laJWzwkwwonK8E5+viVGqs6ArLl0RChwQtU+LzxB05B7YHn5iL7el7\n4PQ/PXorspmB1glXpwJ/VSPoQ2Jy/3oNLaUvr7QAFwhDhUQ6DL+n12Mjlhlw\nYeimlViQf0iCnT8j8WixQvVrIv+GZV12njlKgofXcpP3gZE3DcSWMl3dH1FP\ndFmGNs5pDoo+2TQGEwSUyohmRU3jSBnmJBxwS8cNMRxU7sUC0n8zCfZ/v7zD\nRynUnenZS1yBIR+UMQ5YEO0ypGdgbkcL4H6zNeryrZWT6NXHyu95TtnjD7Ev\nYauYLpGH4GI9WKqZIPBKzXLYINv10jncSxbnpuN+XR3rGkUi+C00wnVdTGJt\n8lkd\r\n=xvlR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETJFCYuHwE/EONhNt50WCZNXRusMPDBHwAgIcQVUQ86AiEA1u0zuY6MV/4nLDboAWFx1iBsQCe12ZKpLTNdeuE/Nmg="}]},"_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"directories":{},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sax_0.1.1_1614099565148_0.7967937559332416"},"_hasShrinkwrap":false},"0.2.0":{"version":"0.2.0","name":"@trysound/sax","description":"An evented streaming XML parser in JavaScript","author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"repository":{"type":"git","url":"git://github.com/svg/sax.git"},"license":"ISC","contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru","url":"http://github.com/TrySound"}],"main":"lib/sax.js","engines":{"node":">=10.13.0"},"scripts":{"test":"tap test/*.js --cov -j4","lint":"standard -F test/*.js lib/*.js"},"devDependencies":{"standard":"^8.6.0","tap":"^10.5.1"},"gitHead":"ef549959f56d6dfd09fe243aa3b61b1096cb259a","bugs":{"url":"https://github.com/svg/sax/issues"},"homepage":"https://github.com/svg/sax#readme","_id":"@trysound/sax@0.2.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.14","dist":{"integrity":"sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==","shasum":"cccaab758af56761eb7bf37af6f03f326dd798ad","tarball":"https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz","fileCount":4,"unpackedSize":48776,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLWC/CRA9TVsSAnZWagAAY2oP/2CeJOlLt705dgR0kCVL\nFfTYmKif/7qoiVCeb72j8LD5DXTqY+Vk/bhtSs1KA5b0oYE288Mga5BOXkPB\nKjt5lklUKC68mexlvmK/mry7uwbe/2ztcWyrZUUwoNDlRva5dYMqkJ1oKf0M\n7mJdylwyuScJpdbHxAdz6+nw97WiFll7mitCopVjAWhJ6MOtdeItoFRPBu7s\nyZVc7rDtmdEBOVNDSZOA9S8Ot3SMUl+qIgXsmeF/+vHMemcsWsnTtzwTiPm+\ncxhNZg2DIEB1PsL5mmGVvhLmGk3c1A917Yw+CdjFIpnHVEc9WpAaBj9m7Qa5\n8VrI+FC/os6YsAmEjy5PUfJed2do4UOqZZqk1yiv3POny3vm9MHSGv8o0WeT\nIi6PQllsRjivyokX2WuzFRdJ0c+MoG2Hz2QMniM22rgHdHj+SOOV1wrG8Yq4\nxGEY6TmH6EfvknWEdmybhdHI/5iJxQ6AV0lAzOuhr8OjKSW0304V9VEd5xiK\nGCEzBR+q3SmHLfuvAPJ3vriU2npMTJe0qiBcNtSkzqmX6Pf+FgqnGcmVS5Z+\n2zpFO1/TgLabb6j150+tvRyHhk7ioYbirMuGT96MkaXZYhsuSFrIfVhKF2Ps\nL041E83h5SXZ+I+jwNbZa1+wJLNxD+2c22duRIrZyrwSni1Beawr6Tdl1iBR\nz2le\r\n=zxTn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6p2U0mqqsXuDwWC4Hczc9E4s8Xn4XDFSbw4bfLsK3zQIgGwFqEIU4Vb+Hmd7TCO4vCYSH/giahfwwHGhPW1y6E9I="}]},"_npmUser":{"name":"trysound","email":"trysound@yandex.ru"},"directories":{},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sax_0.2.0_1630363839758_0.655985058793294"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-23T09:23:03.598Z","0.1.0":"2021-02-23T09:23:03.785Z","modified":"2022-04-07T07:51:00.289Z","0.1.1":"2021-02-23T16:59:25.326Z","0.2.0":"2021-08-30T22:50:39.924Z"},"maintainers":[{"name":"trysound","email":"trysound@yandex.ru"}],"description":"An evented streaming XML parser in JavaScript","homepage":"https://github.com/svg/sax#readme","repository":{"type":"git","url":"git://github.com/svg/sax.git"},"contributors":[{"name":"Bogdan Chadkin","email":"trysound@yandex.ru","url":"http://github.com/TrySound"}],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"bugs":{"url":"https://github.com/svg/sax/issues"},"license":"ISC","readme":"# svg/sax\n\nA maintained fork of [sax-js](https://github.com/isaacs/sax-js) sax-style parser for XML and HTML.\n\nDesigned with [node](http://nodejs.org/) in mind, but should work fine in\nthe browser or other CommonJS implementations.\n\n## What This Is\n\n* A very simple tool to parse through an XML string.\n* A stepping stone to a streaming HTML parser.\n* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML\n  docs.\n\n## What This Is (probably) Not\n\n* An HTML Parser - That's a fine goal, but this isn't it.  It's just\n  XML.\n* A DOM Builder - You can use it to build an object model out of XML,\n  but it doesn't do that out of the box.\n* XSLT - No DOM = no querying.\n* 100% Compliant with (some other SAX implementation) - Most SAX\n  implementations are in Java and do a lot more than this does.\n* An XML Validator - It does a little validation when in strict mode, but\n  not much.\n* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic\n  masochism.\n* A DTD-aware Thing - Fetching DTDs is a much bigger job.\n\n## Regarding `<!DOCTYPE`s and `<!ENTITY`s\n\nThe parser will handle the basic XML entities in text nodes and attribute\nvalues: `&amp; &lt; &gt; &apos; &quot;`. It's possible to define additional\nentities in XML by putting them in the DTD. This parser doesn't do anything\nwith that. If you want to listen to the `ondoctype` event, and then fetch\nthe doctypes, and read the entities and add them to `parser.ENTITIES`, then\nbe my guest.\n\nUnknown entities will fail in strict mode, and in loose mode, will pass\nthrough unmolested.\n\n## Usage\n\n```javascript\nvar sax = require(\"./lib/sax\"),\n  strict = true, // set to false for html-mode\n  parser = sax.parser(strict);\n\nparser.onerror = function (e) {\n  // an error happened.\n};\nparser.ontext = function (t) {\n  // got some text.  t is the string of text.\n};\nparser.onopentag = function (node) {\n  // opened a tag.  node has \"name\" and \"attributes\"\n};\nparser.onattribute = function (attr) {\n  // an attribute.  attr has \"name\" and \"value\"\n};\nparser.onend = function () {\n  // parser stream is done, and ready to have more stuff written to it.\n};\n\nparser.write('<xml>Hello, <who name=\"world\">world</who>!</xml>').close();\n```\n\n\n## Arguments\n\nPass the following arguments to the parser function.  All are optional.\n\n`strict` - Boolean. Whether or not to be a jerk. Default: `false`.\n\n`opt` - Object bag of settings regarding string formatting.  All default to `false`.\n\nSettings supported:\n\n* `trim` - Boolean. Whether or not to trim text and comment nodes.\n* `normalize` - Boolean. If true, then turn any whitespace into a single\n  space.\n* `lowercase` - Boolean. If true, then lowercase tag names and attribute names\n  in loose mode, rather than uppercasing them.\n* `xmlns` - Boolean. If true, then namespaces are supported.\n* `position` - Boolean. If false, then don't track line/col/position.\n* `strictEntities` - Boolean. If true, only parse [predefined XML\n  entities](http://www.w3.org/TR/REC-xml/#sec-predefined-ent)\n  (`&amp;`, `&apos;`, `&gt;`, `&lt;`, and `&quot;`)\n\n## Methods\n\n`write` - Write bytes onto the stream. You don't have to do this all at\nonce. You can keep writing as much as you want.\n\n`close` - Close the stream. Once closed, no more data may be written until\nit is done processing the buffer, which is signaled by the `end` event.\n\n`resume` - To gracefully handle errors, assign a listener to the `error`\nevent. Then, when the error is taken care of, you can call `resume` to\ncontinue parsing. Otherwise, the parser will not continue while in an error\nstate.\n\n## Members\n\nAt all times, the parser object will have the following members:\n\n`line`, `column`, `position` - Indications of the position in the XML\ndocument where the parser currently is looking.\n\n`startTagPosition` - Indicates the position where the current tag starts.\n\n`closed` - Boolean indicating whether or not the parser can be written to.\nIf it's `true`, then wait for the `ready` event to write again.\n\n`strict` - Boolean indicating whether or not the parser is a jerk.\n\n`opt` - Any options passed into the constructor.\n\n`tag` - The current tag being dealt with.\n\nAnd a bunch of other stuff that you probably shouldn't touch.\n\n## Events\n\nAll events emit with a single argument. To listen to an event, assign a\nfunction to `on<eventname>`. Functions get executed in the this-context of\nthe parser object. The list of supported events are also in the exported\n`EVENTS` array.\n\n`error` - Indication that something bad happened. The error will be hanging\nout on `parser.error`, and must be deleted before parsing can continue. By\nlistening to this event, you can keep an eye on that kind of stuff. Note:\nthis happens *much* more in strict mode. Argument: instance of `Error`.\n\n`text` - Text node. Argument: string of text.\n\n`doctype` - The `<!DOCTYPE` declaration. Argument: doctype string.\n\n`processinginstruction` - Stuff like `<?xml foo=\"blerg\" ?>`. Argument:\nobject with `name` and `body` members. Attributes are not parsed, as\nprocessing instructions have implementation dependent semantics.\n\n`sgmldeclaration` - Random SGML declarations. Stuff like `<!ENTITY p>`\nwould trigger this kind of event. This is a weird thing to support, so it\nmight go away at some point. SAX isn't intended to be used to parse SGML,\nafter all.\n\n`opentagstart` - Emitted immediately when the tag name is available,\nbut before any attributes are encountered.  Argument: object with a\n`name` field and an empty `attributes` set.  Note that this is the\nsame object that will later be emitted in the `opentag` event.\n\n`opentag` - An opening tag. Argument: object with `name` and `attributes`.\nIn non-strict mode, tag names are uppercased, unless the `lowercase`\noption is set.  If the `xmlns` option is set, then it will contain\nnamespace binding information on the `ns` member, and will have a\n`local`, `prefix`, and `uri` member.\n\n`closetag` - A closing tag. In loose mode, tags are auto-closed if their\nparent closes. In strict mode, well-formedness is enforced. Note that\nself-closing tags will have `closeTag` emitted immediately after `openTag`.\nArgument: tag name.\n\n`attribute` - An attribute node.  Argument: object with `name` and `value`.\nIn non-strict mode, attribute names are uppercased, unless the `lowercase`\noption is set.  If the `xmlns` option is set, it will also contains namespace\ninformation.\n\n`comment` - A comment node.  Argument: the string of the comment.\n\n`opencdata` - The opening tag of a `<![CDATA[` block.\n\n`cdata` - The text of a `<![CDATA[` block. Since `<![CDATA[` blocks can get\nquite large, this event may fire multiple times for a single block, if it\nis broken up into multiple `write()`s. Argument: the string of random\ncharacter data.\n\n`closecdata` - The closing tag (`]]>`) of a `<![CDATA[` block.\n\n`opennamespace` - If the `xmlns` option is set, then this event will\nsignal the start of a new namespace binding.\n\n`closenamespace` - If the `xmlns` option is set, then this event will\nsignal the end of a namespace binding.\n\n`end` - Indication that the closed stream has ended.\n\n`ready` - Indication that the stream has reset, and is ready to be written\nto.\n\n`noscript` - In non-strict mode, `<script>` tags trigger a `\"script\"`\nevent, and their contents are not checked for special xml characters.\nIf you pass `noscript: true`, then this behavior is suppressed.\n\n## Reporting Problems\n\nIt's best to write a failing test if you find an issue.  I will always\naccept pull requests with failing tests if they demonstrate intended\nbehavior, but it is very hard to figure out what issue you're describing\nwithout a test.  Writing a test is also the best way for you yourself\nto figure out if you really understand the issue you think you have with\nsax-js.\n","readmeFilename":"README.md"}