MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / EasySAXParser

Function EasySAXParser

packages/core/js-libs/easysax/easysax.js:66–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64// };
65
66function 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
99EasySAXParser.prototype.on = function(name, cb) {
100 if (typeof cb !== 'function') {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected