()
| 64 | // }; |
| 65 | |
| 66 | function EasySAXParser() { |
| 67 | 'use strict'; |
| 68 | |
| 69 | if (!this) return null; |
| 70 | |
| 71 | this.angularSyntax = false; |
| 72 | |
| 73 | function nullFunc() {}; |
| 74 | |
| 75 | this.onTextNode = nullFunc; |
| 76 | this.onStartNode = nullFunc; |
| 77 | this.onEndNode = nullFunc; |
| 78 | this.onCDATA = nullFunc; |
| 79 | this.onError = nullFunc; |
| 80 | this.onComment = null; |
| 81 | this.onQuestion = null; |
| 82 | this.onAttention = null; |
| 83 | this.is_onComment = this.is_onQuestion = this.is_onAttention = false; |
| 84 | |
| 85 | this.isNamespace = false; |
| 86 | this.useNS = null; |
| 87 | this.default_xmlns = null; |
| 88 | this.xmlns = null; |
| 89 | this.nsmatrix = {xmlns: this.xmlns}; |
| 90 | this.hasSurmiseNS = false; |
| 91 | ; |
| 92 | |
| 93 | |
| 94 | this.attr_string = ''; // строка атрибутов |
| 95 | this.attr_posstart = 0; // |
| 96 | this.attr_res; // закешированный результат разбора атрибутов , null - разбор не проводился, object - хеш атрибутов, true - нет атрибутов, false - невалидный xml |
| 97 | } |
| 98 | |
| 99 | EasySAXParser.prototype.on = function(name, cb) { |
| 100 | if (typeof cb !== 'function') { |
nothing calls this directly
no outgoing calls
no test coverage detected