@sap/async-xsjs 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +37 -0
  3. package/README.md +445 -0
  4. package/differences.md +162 -0
  5. package/docs/$.Application.html +262 -0
  6. package/docs/$.Session.html +674 -0
  7. package/docs/$.db.CallableStatement.html +2524 -0
  8. package/docs/$.db.Connection.html +511 -0
  9. package/docs/$.db.ParameterMetaData.html +805 -0
  10. package/docs/$.db.PreparedStatement.html +1796 -0
  11. package/docs/$.db.ResultSet.html +1308 -0
  12. package/docs/$.db.ResultSetMetaData.html +800 -0
  13. package/docs/$.db.SQLException.html +259 -0
  14. package/docs/$.db.html +773 -0
  15. package/docs/$.hdb.ColumnMetadata.html +438 -0
  16. package/docs/$.hdb.Connection.html +663 -0
  17. package/docs/$.hdb.ProcedureResult.html +280 -0
  18. package/docs/$.hdb.ResultSet.html +324 -0
  19. package/docs/$.hdb.ResultSetIterator.html +315 -0
  20. package/docs/$.hdb.ResultSetMetaData.html +259 -0
  21. package/docs/$.hdb.SQLException.html +259 -0
  22. package/docs/$.hdb.html +557 -0
  23. package/docs/$.html +471 -0
  24. package/docs/$.jobs.Job.html +783 -0
  25. package/docs/$.jobs.JobLog.html +380 -0
  26. package/docs/$.jobs.JobSchedules.html +852 -0
  27. package/docs/$.jobs.html +238 -0
  28. package/docs/$.net.Destination.html +304 -0
  29. package/docs/$.net.Mail.Part.html +510 -0
  30. package/docs/$.net.Mail.html +504 -0
  31. package/docs/$.net.SMTPConnection.html +347 -0
  32. package/docs/$.net.html +749 -0
  33. package/docs/$.net.http.Client.html +562 -0
  34. package/docs/$.net.http.Destination.html +237 -0
  35. package/docs/$.net.http.Request.html +567 -0
  36. package/docs/$.net.http.html +292 -0
  37. package/docs/$.security.AntiVirus.html +361 -0
  38. package/docs/$.security.Store.html +636 -0
  39. package/docs/$.security.crypto.html +414 -0
  40. package/docs/$.security.html +247 -0
  41. package/docs/$.security.x509.html +373 -0
  42. package/docs/$.text.analysis.Session.html +983 -0
  43. package/docs/$.text.analysis.html +242 -0
  44. package/docs/$.text.html +246 -0
  45. package/docs/$.text.mining.Session.html +2018 -0
  46. package/docs/$.text.mining.html +242 -0
  47. package/docs/$.trace.html +525 -0
  48. package/docs/$.util.SAXParser.html +955 -0
  49. package/docs/$.util.Zip.html +474 -0
  50. package/docs/$.util.codec.html +414 -0
  51. package/docs/$.util.compression.html +357 -0
  52. package/docs/$.util.html +325 -0
  53. package/docs/$.util.sql.html +290 -0
  54. package/docs/$.web.Body.html +333 -0
  55. package/docs/$.web.EntityList.html +296 -0
  56. package/docs/$.web.TupelList.html +496 -0
  57. package/docs/$.web.WebEntityRequest.html +393 -0
  58. package/docs/$.web.WebEntityResponse.html +392 -0
  59. package/docs/$.web.WebRequest.html +560 -0
  60. package/docs/$.web.WebResponse.html +609 -0
  61. package/docs/$.web.html +246 -0
  62. package/docs/Copyright-SAP.html +39 -0
  63. package/docs/Disclaimer-SAP.html +55 -0
  64. package/docs/index.html +232 -0
  65. package/docs/styles/jsdoc-default.css +382 -0
  66. package/lib/AppConfig.js +36 -0
  67. package/lib/AuditLogger.js +41 -0
  68. package/lib/cacert.js +26 -0
  69. package/lib/ctypes.js +153 -0
  70. package/lib/destinations/dest-provider.js +57 -0
  71. package/lib/index.js +235 -0
  72. package/lib/jobs/Action.js +40 -0
  73. package/lib/jobs/Job.js +100 -0
  74. package/lib/jobs/JobManager.js +150 -0
  75. package/lib/jobs/JobsRuntime.js +133 -0
  76. package/lib/jobs/SqlScriptJobRunner.js +36 -0
  77. package/lib/jobs/XsjsJobRunner.js +78 -0
  78. package/lib/jobs/index.js +11 -0
  79. package/lib/logging.js +16 -0
  80. package/lib/middleware.js +125 -0
  81. package/lib/odata/ODataService.js +125 -0
  82. package/lib/odata/index.js +7 -0
  83. package/lib/odata/service-factory.js +26 -0
  84. package/lib/passport-noauth.js +17 -0
  85. package/lib/routes.js +115 -0
  86. package/lib/runtime.js +740 -0
  87. package/lib/sandbox.js +40 -0
  88. package/lib/utils/XsJsFunctionRunner.js +57 -0
  89. package/lib/utils/XsJsLibFunctionRunner.js +57 -0
  90. package/lib/utils/buffer-utils.js +77 -0
  91. package/lib/utils/compression-utils.js +14 -0
  92. package/lib/utils/date-utils.js +104 -0
  93. package/lib/utils/errors/HttpError.js +20 -0
  94. package/lib/utils/errors/wrap-app-error.js +18 -0
  95. package/lib/utils/index.js +17 -0
  96. package/lib/utils/xs-function-runner.js +51 -0
  97. package/lib/utils/xs-types.js +21 -0
  98. package/lib/utils/xspath.js +36 -0
  99. package/lib/utils/xsstack.js +28 -0
  100. package/lib/views/error.html +28 -0
  101. package/lib/xsjs/Application.js +28 -0
  102. package/lib/xsjs/Locale.js +53 -0
  103. package/lib/xsjs/Session.js +31 -0
  104. package/lib/xsjs/constants.js +71 -0
  105. package/lib/xsjs/db/common/DbBase.js +85 -0
  106. package/lib/xsjs/db/common/DbOptions.js +163 -0
  107. package/lib/xsjs/db/common/arguments-validation.js +102 -0
  108. package/lib/xsjs/db/common/connection.js +12 -0
  109. package/lib/xsjs/db/common/enums.js +93 -0
  110. package/lib/xsjs/db/common/execute-batch.js +38 -0
  111. package/lib/xsjs/db/common/parse-time.js +139 -0
  112. package/lib/xsjs/db/dbapi/CallableStatement.js +192 -0
  113. package/lib/xsjs/db/dbapi/Connection.js +78 -0
  114. package/lib/xsjs/db/dbapi/DB.js +39 -0
  115. package/lib/xsjs/db/dbapi/ParameterMetaData.js +118 -0
  116. package/lib/xsjs/db/dbapi/PreparedStatement.js +78 -0
  117. package/lib/xsjs/db/dbapi/ResultSet.js +220 -0
  118. package/lib/xsjs/db/dbapi/ResultSetMetaData.js +116 -0
  119. package/lib/xsjs/db/dbapi/Statement.js +514 -0
  120. package/lib/xsjs/db/dbapi/conversions.js +113 -0
  121. package/lib/xsjs/db/dbapi/fetch-rows.js +32 -0
  122. package/lib/xsjs/db/hdbapi/Connection.js +525 -0
  123. package/lib/xsjs/db/hdbapi/HDB.js +32 -0
  124. package/lib/xsjs/db/hdbapi/ResultSetIterator.js +40 -0
  125. package/lib/xsjs/db/hdbapi/convert.js +77 -0
  126. package/lib/xsjs/db/hdbapi/table-string-parser.js +52 -0
  127. package/lib/xsjs/db/index.js +4 -0
  128. package/lib/xsjs/index.js +13 -0
  129. package/lib/xsjs/jobs/Job.js +228 -0
  130. package/lib/xsjs/jobs/Jobs.js +11 -0
  131. package/lib/xsjs/jobs/Logs.js +127 -0
  132. package/lib/xsjs/jobs/Schedule.js +110 -0
  133. package/lib/xsjs/jobs/Schedules.js +108 -0
  134. package/lib/xsjs/net/Destination.js +43 -0
  135. package/lib/xsjs/net/http/Client.js +220 -0
  136. package/lib/xsjs/net/http/HTTP.js +72 -0
  137. package/lib/xsjs/net/index.js +5 -0
  138. package/lib/xsjs/net/smtp/Mail.js +38 -0
  139. package/lib/xsjs/net/smtp/Part.js +30 -0
  140. package/lib/xsjs/net/smtp/SMTPConnection.js +39 -0
  141. package/lib/xsjs/net/smtp/index.js +18 -0
  142. package/lib/xsjs/net/smtp/nodemailer-util.js +77 -0
  143. package/lib/xsjs/require.js +39 -0
  144. package/lib/xsjs/security/AntiVirus.js +31 -0
  145. package/lib/xsjs/security/Store.js +119 -0
  146. package/lib/xsjs/security/crypto.js +23 -0
  147. package/lib/xsjs/security/index.js +5 -0
  148. package/lib/xsjs/security/x509.js +12 -0
  149. package/lib/xsjs/text/analysis/Session.js +128 -0
  150. package/lib/xsjs/text/index.js +30 -0
  151. package/lib/xsjs/text/mining/Session.js +82 -0
  152. package/lib/xsjs/trace/trace.js +41 -0
  153. package/lib/xsjs/util/SAXParser.js +174 -0
  154. package/lib/xsjs/util/Zip.js +220 -0
  155. package/lib/xsjs/util/codec.js +33 -0
  156. package/lib/xsjs/util/compression.js +24 -0
  157. package/lib/xsjs/util/index.js +22 -0
  158. package/lib/xsjs/web/BasicWebEntity.js +41 -0
  159. package/lib/xsjs/web/EntityList.js +11 -0
  160. package/lib/xsjs/web/TupelLists/CookiesTupelList.js +47 -0
  161. package/lib/xsjs/web/TupelLists/HeadersTupelList.js +55 -0
  162. package/lib/xsjs/web/TupelLists/ParametersTupelList.js +83 -0
  163. package/lib/xsjs/web/TupelLists/TupelListBase.js +45 -0
  164. package/lib/xsjs/web/WebBody.js +135 -0
  165. package/lib/xsjs/web/WebEntityRequest.js +40 -0
  166. package/lib/xsjs/web/WebEntityResponse.js +26 -0
  167. package/lib/xsjs/web/WebRequest.js +209 -0
  168. package/lib/xsjs/web/WebResponse.js +183 -0
  169. package/lib/xsjs/web/index.js +4 -0
  170. package/lib/xsjs/web/utils/HeadersParser.js +53 -0
  171. package/lib/xsjs/web/utils/HttpRequestParser.js +93 -0
  172. package/lib/xsjs/web/utils/MultipartParser.js +163 -0
  173. package/lib/xsjs/web/utils/MultipartResponseBuilder.js +73 -0
  174. package/lib/xsjs/web/utils/SetCookieParser.js +32 -0
  175. package/lib/xsjslib/TextBundleWrapper.js +46 -0
  176. package/lib/xsjslib/index.js +11 -0
  177. package/npm-shrinkwrap.json +11540 -0
  178. package/package.json +84 -0
@@ -0,0 +1,955 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>JSDoc: Class: SAXParser</title>
7
+ <script src="scripts/prettify/prettify.js"></script>
8
+ <script src="scripts/prettify/lang-css.js"></script>
9
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
10
+
11
+
12
+ <script src="scripts/launch-8b3c5ca29b9e.min.js"></script>
13
+ <script src="scripts/highlight.js"></script>
14
+ <link rel="canonical" href="$.util.SAXParser.html">
15
+ </head>
16
+ <body>
17
+ <div id="main">
18
+ <h1 class="page-title">Class: SAXParser</h1>
19
+ <section>
20
+ <header>
21
+ <h2>
22
+ <span class="ancestors"><a href="$.html">$</a><a href="$.util.html">.util</a>.</span>
23
+ SAXParser
24
+ </h2>
25
+ <div class="class-description">Class for parsing XML. It is based on expat.</div>
26
+ </header>
27
+ <article>
28
+ <div class="container-overview">
29
+ <dt>
30
+ <h4 class="name" id="SAXParser"><span class="type-signature"></span>new SAXParser<span
31
+ class="signature">()</span><span class="type-signature"></span></h4>
32
+ </dt>
33
+ <dd>
34
+ <dl class="details">
35
+ </dl>
36
+ <h5>Example</h5>
37
+ <pre class="prettyprint"><code>//parse XML from String
38
+ var parser = new $.util.SAXParser();
39
+ var xml = '&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;\n\
40
+ &lt;!-- this is a note --&gt;\n\
41
+ &lt;notes&gt;\n\
42
+ &lt;note noteName="My first note"&gt;\n\
43
+ &lt;to&gt;To&lt;/to&gt;\n\
44
+ &lt;from&gt;From&lt;/from&gt;\n\
45
+ &lt;date timezone="UTC"&gt;Thu, 09 Jul 2015 08:42:44&lt;/date&gt;\n\
46
+ &lt;subject&gt;Note subject&lt;/subject&gt;\n\
47
+ &lt;body contentType="text/plain"&gt;Note body&lt;/body&gt;\n\
48
+ &lt;/note&gt;\n\
49
+ &lt;note noteName="My second note"&gt;\n\
50
+ &lt;to&gt;To&lt;/to&gt;\n\
51
+ &lt;from&gt;From&lt;/from&gt;\n\
52
+ &lt;date timezone="UTC"&gt;Fri, 10 Jul 2015 09:00:00&lt;/date&gt;\n\
53
+ &lt;subject&gt;Note subject&lt;/subject&gt;\n\
54
+ &lt;body&gt;Note body&lt;/body&gt;\n\
55
+ &lt;/note&gt;\n\
56
+ &lt;/notes&gt;\n';
57
+
58
+ var rootElement;
59
+ var characterData = [];
60
+ var elementStack = [];
61
+
62
+ parser.startElementHandler = function(name, attrs) {
63
+ var data = attrs; // use attrs object with all properties as template
64
+ data.name = name; // add the name to the object
65
+
66
+ if(!rootElement) { // the first element we see is the root element we want to send as response
67
+ rootElement = data;
68
+ } else {
69
+ var currentElement = elementStack[elementStack.length - 1];
70
+ if(!currentElement.children) { // first time we see a child we have to create the children array
71
+ currentElement.children = [ data ];
72
+ } else {
73
+ currentElement.children.push(data)
74
+ }
75
+ }
76
+ elementStack.push(data);
77
+ };
78
+
79
+ parser.endElementHandler = function(name) {
80
+ elementStack.pop();
81
+ };
82
+
83
+ parser.characterDataHandler = function(s) {
84
+ var currentElement = elementStack[elementStack.length - 1];
85
+ if (!currentElement.characterData) { // the first time we see char data we store it as string
86
+ currentElement.characterData = s;
87
+ } else if (!Array.isArray(currentElement.characterData)) { // if we already have a string we convert it to an array and append the new data
88
+ currentElement.characterData = [currentElement.characterData, s];
89
+ } else { // just append new data to the existing array
90
+ currentElement.characterData.push(s);
91
+ }
92
+ };
93
+
94
+ parser.parse(xml);
95
+
96
+ $.response.contentType = "application/json";
97
+ $.response.setBody(JSON.stringify({
98
+ rootElement: rootElement,
99
+ characterData: characterData
100
+ }));</code></pre>
101
+ </dd>
102
+ </div>
103
+ <h3 class="subsection-title">Members</h3>
104
+ <dl>
105
+ <dt>
106
+ <h4 class="name" id="attlistDeclHandler"><span class="type-signature"></span>attlistDeclHandler<span
107
+ class="type-signature"> :function</span></h4>
108
+ </dt>
109
+ <dd>
110
+ <div class="description">
111
+ This property holds a callback function with the following parameters: elname(String),
112
+ attname(String), att_type(String), dflt(String) and isrequired(Integer).
113
+ </div>
114
+ <h5>Type:</h5>
115
+ <ul>
116
+ <li>
117
+ <span class="param-type">function</span>
118
+ </li>
119
+ </ul>
120
+ <dl class="details">
121
+ </dl>
122
+ <h5>Example</h5>
123
+ <pre class="prettyprint"><code>parser.attlistDeclHandler = function(elname, attname, att_type, dflt, isrequired) {
124
+ // do some thing
125
+ }</code></pre>
126
+ </dd>
127
+ <dt>
128
+ <h4 class="name" id="characterDataHandler"><span
129
+ class="type-signature"></span>characterDataHandler<span
130
+ class="type-signature"> :function</span></h4>
131
+ </dt>
132
+ <dd>
133
+ <div class="description">
134
+ This property holds a callback function with one parameter: s(String).
135
+ </div>
136
+ <h5>Type:</h5>
137
+ <ul>
138
+ <li>
139
+ <span class="param-type">function</span>
140
+ </li>
141
+ </ul>
142
+ <dl class="details">
143
+ </dl>
144
+ <h5>Example</h5>
145
+ <pre class="prettyprint"><code>parser.characterDataHandler = function(s) {
146
+ // do some thing
147
+ }</code></pre>
148
+ </dd>
149
+ <dt>
150
+ <h4 class="name" id="commentHandler"><span class="type-signature"></span>commentHandler<span
151
+ class="type-signature"> :function</span></h4>
152
+ </dt>
153
+ <dd>
154
+ <div class="description">
155
+ This property holds a callback function with one parameter: data(String).
156
+ </div>
157
+ <h5>Type:</h5>
158
+ <ul>
159
+ <li>
160
+ <span class="param-type">function</span>
161
+ </li>
162
+ </ul>
163
+ <dl class="details">
164
+ </dl>
165
+ <h5>Example</h5>
166
+ <pre class="prettyprint"><code>parser.commentHandler = function(data) {
167
+ // do some thing
168
+ }</code></pre>
169
+ </dd>
170
+ <dt>
171
+ <h4 class="name" id="currentByteIndex"><span class="type-signature"></span>currentByteIndex<span
172
+ class="type-signature"> :Integer</span></h4>
173
+ </dt>
174
+ <dd>
175
+ <div class="description">
176
+ This property holds the current byte index of the parser
177
+ </div>
178
+ <h5>Type:</h5>
179
+ <ul>
180
+ <li>
181
+ <span class="param-type">Integer</span>
182
+ </li>
183
+ </ul>
184
+ <dl class="details">
185
+ </dl>
186
+ </dd>
187
+ <dt>
188
+ <h4 class="name" id="currentColumnNumber"><span
189
+ class="type-signature"></span>currentColumnNumber<span
190
+ class="type-signature"> :Integer</span></h4>
191
+ </dt>
192
+ <dd>
193
+ <div class="description">
194
+ This property holds the current column position of the parser
195
+ </div>
196
+ <h5>Type:</h5>
197
+ <ul>
198
+ <li>
199
+ <span class="param-type">Integer</span>
200
+ </li>
201
+ </ul>
202
+ <dl class="details">
203
+ </dl>
204
+ </dd>
205
+ <dt>
206
+ <h4 class="name" id="currentLineNumber"><span class="type-signature"></span>currentLineNumber<span
207
+ class="type-signature"> :Integer</span></h4>
208
+ </dt>
209
+ <dd>
210
+ <div class="description">
211
+ This property holds the current line position of the parser
212
+ </div>
213
+ <h5>Type:</h5>
214
+ <ul>
215
+ <li>
216
+ <span class="param-type">Integer</span>
217
+ </li>
218
+ </ul>
219
+ <dl class="details">
220
+ </dl>
221
+ </dd>
222
+ <dt>
223
+ <h4 class="name" id="endCDataSectionHandler"><span class="type-signature"></span>endCDataSectionHandler<span
224
+ class="type-signature"> :function</span></h4>
225
+ </dt>
226
+ <dd>
227
+ <div class="description">
228
+ This property holds a callback function with no parameters.
229
+ </div>
230
+ <h5>Type:</h5>
231
+ <ul>
232
+ <li>
233
+ <span class="param-type">function</span>
234
+ </li>
235
+ </ul>
236
+ <dl class="details">
237
+ </dl>
238
+ <h5>Example</h5>
239
+ <pre class="prettyprint"><code>parser.endCDataSectionHandler = function() {
240
+ // do some thing
241
+ }</code></pre>
242
+ </dd>
243
+ <dt>
244
+ <h4 class="name" id="endDoctypeDeclHandler"><span class="type-signature"></span>endDoctypeDeclHandler<span
245
+ class="type-signature"> :function</span></h4>
246
+ </dt>
247
+ <dd>
248
+ <div class="description">
249
+ This property holds a callback function with no parameters.
250
+ </div>
251
+ <h5>Type:</h5>
252
+ <ul>
253
+ <li>
254
+ <span class="param-type">function</span>
255
+ </li>
256
+ </ul>
257
+ <dl class="details">
258
+ </dl>
259
+ <h5>Example</h5>
260
+ <pre class="prettyprint"><code>parser.endDoctypeDeclHandler = function() {
261
+ // do some thing
262
+ }</code></pre>
263
+ </dd>
264
+ <dt>
265
+ <h4 class="name" id="endElementHandler"><span class="type-signature"></span>endElementHandler<span
266
+ class="type-signature"> :function</span></h4>
267
+ </dt>
268
+ <dd>
269
+ <div class="description">
270
+ This property holds a callback function with one parameter: name(String).
271
+ </div>
272
+ <h5>Type:</h5>
273
+ <ul>
274
+ <li>
275
+ <span class="param-type">function</span>
276
+ </li>
277
+ </ul>
278
+ <dl class="details">
279
+ </dl>
280
+ <h5>Example</h5>
281
+ <pre class="prettyprint"><code>parser.endElementHandler = function(name) {
282
+ // do some thing
283
+ }</code></pre>
284
+ </dd>
285
+ <dt>
286
+ <h4 class="name" id="endNameSpaceDeclHandler"><span class="type-signature"></span>endNameSpaceDeclHandler<span
287
+ class="type-signature"> :function</span></h4>
288
+ </dt>
289
+ <dd>
290
+ <div class="description">
291
+ This property holds a callback function with one parameter: prefix(String).
292
+ </div>
293
+ <h5>Type:</h5>
294
+ <ul>
295
+ <li>
296
+ <span class="param-type">function</span>
297
+ </li>
298
+ </ul>
299
+ <dl class="details">
300
+ </dl>
301
+ <h5>Example</h5>
302
+ <pre class="prettyprint"><code>parser.endNameSpaceDeclHandler = function(prefix) {
303
+ // do some thing
304
+ }</code></pre>
305
+ </dd>
306
+ <dt>
307
+ <h4 class="name" id="entityDeclHandler"><span class="type-signature"></span>entityDeclHandler<span
308
+ class="type-signature"> :function</span></h4>
309
+ </dt>
310
+ <dd>
311
+ <div class="description">
312
+ This property holds a callback function with seven parameters: entityName(String),
313
+ is_parameter_entity(Integer), value(String), systemId(String), publicId(String) and
314
+ notationName(String).
315
+ <br><b>NOTE:</b> During parsing it is the application's responsibility to prevent large number
316
+ of multiple XML entity expansions.
317
+ </div>
318
+ <h5>Type:</h5>
319
+ <ul>
320
+ <li>
321
+ <span class="param-type">function</span>
322
+ </li>
323
+ </ul>
324
+ <dl class="details">
325
+ </dl>
326
+ <h5>Example</h5>
327
+ <pre class="prettyprint"><code>parser.entityDeclHandler = function(entityName, is_parameter_entity, value, systemId, publicId, notationName) {
328
+ // do some thing
329
+ }</code></pre>
330
+ </dd>
331
+ <dt>
332
+ <h4 class="name" id="externalEntityRefHandler"><span class="type-signature"></span>externalEntityRefHandler<span
333
+ class="type-signature"> :function</span></h4>
334
+ </dt>
335
+ <dd>
336
+ <div class="description">
337
+ This property holds a callback function with four parameters: context(String), systemId(String)
338
+ and publicId(String).
339
+ </div>
340
+ <h5>Type:</h5>
341
+ <ul>
342
+ <li>
343
+ <span class="param-type">function</span>
344
+ </li>
345
+ </ul>
346
+ <dl class="details">
347
+ </dl>
348
+ <h5>Example</h5>
349
+ <pre class="prettyprint"><code>parser.externalEntityRefHandler = function(context, systemId, publicId) {
350
+ // do some thing
351
+ }</code></pre>
352
+ </dd>
353
+ <dt>
354
+ <h4 class="name" id="notationDeclHandler"><span
355
+ class="type-signature"></span>notationDeclHandler<span
356
+ class="type-signature"> :function</span></h4>
357
+ </dt>
358
+ <dd>
359
+ <div class="description">
360
+ This property holds a callback function with four parameters: notationName(String),
361
+ systemId(String) and publicId(String).
362
+ </div>
363
+ <h5>Type:</h5>
364
+ <ul>
365
+ <li>
366
+ <span class="param-type">function</span>
367
+ </li>
368
+ </ul>
369
+ <dl class="details">
370
+ </dl>
371
+ <h5>Example</h5>
372
+ <pre class="prettyprint"><code>parser.notationDeclHandler = function(notationName, systemId, publicId) {
373
+ // do some thing
374
+ }</code></pre>
375
+ </dd>
376
+ <dt>
377
+ <h4 class="name" id="processingInstructionHandler"><span class="type-signature"></span>processingInstructionHandler<span
378
+ class="type-signature"> :function</span></h4>
379
+ </dt>
380
+ <dd>
381
+ <div class="description">
382
+ This property holds a callback function with two parameters: target(String) and data(String).
383
+ </div>
384
+ <h5>Type:</h5>
385
+ <ul>
386
+ <li>
387
+ <span class="param-type">function</span>
388
+ </li>
389
+ </ul>
390
+ <dl class="details">
391
+ </dl>
392
+ <h5>Example</h5>
393
+ <pre class="prettyprint"><code>parser.processingInstructionHandler = function(target, data) {
394
+ // do some thing
395
+ }</code></pre>
396
+ </dd>
397
+ <dt>
398
+ <h4 class="name" id="startCDataSectionHandler"><span class="type-signature"></span>startCDataSectionHandler<span
399
+ class="type-signature"> :function</span></h4>
400
+ </dt>
401
+ <dd>
402
+ <div class="description">
403
+ This property holds a callback function with no parameters.
404
+ </div>
405
+ <h5>Type:</h5>
406
+ <ul>
407
+ <li>
408
+ <span class="param-type">function</span>
409
+ </li>
410
+ </ul>
411
+ <dl class="details">
412
+ </dl>
413
+ <h5>Example</h5>
414
+ <pre class="prettyprint"><code>parser.startCDataSectionHandler = function() {
415
+ // do some thing
416
+ }</code></pre>
417
+ </dd>
418
+ <dt>
419
+ <h4 class="name" id="startDoctypeDeclHandler"><span class="type-signature"></span>startDoctypeDeclHandler<span
420
+ class="type-signature"> :function</span></h4>
421
+ </dt>
422
+ <dd>
423
+ <div class="description">
424
+ This property holds a callback function with four parameters: doctypeName(String),
425
+ sysid(String), pubid(String) and has_internal_subset(Integer).
426
+ </div>
427
+ <h5>Type:</h5>
428
+ <ul>
429
+ <li>
430
+ <span class="param-type">function</span>
431
+ </li>
432
+ </ul>
433
+ <dl class="details">
434
+ </dl>
435
+ <h5>Example</h5>
436
+ <pre class="prettyprint"><code>parser.startDoctypeDeclHandler = function(doctypeName, sysid, pubid, has_internal_subset) {
437
+ // do some thing
438
+ }</code></pre>
439
+ </dd>
440
+ <dt>
441
+ <h4 class="name" id="startElementHandler"><span
442
+ class="type-signature"></span>startElementHandler<span
443
+ class="type-signature"> :function</span></h4>
444
+ </dt>
445
+ <dd>
446
+ <div class="description">
447
+ This property holds a callback function with two parameters: name(String) and atts(Object).
448
+ atts contains key:value pairs of the attributes.
449
+ </div>
450
+ <h5>Type:</h5>
451
+ <ul>
452
+ <li>
453
+ <span class="param-type">function</span>
454
+ </li>
455
+ </ul>
456
+ <dl class="details">
457
+ </dl>
458
+ <h5>Example</h5>
459
+ <pre class="prettyprint"><code>parser.startElementHandler = function(name, atts) {
460
+ // do some thing
461
+ }</code></pre>
462
+ </dd>
463
+ <dt>
464
+ <h4 class="name" id="startNameSpaceDeclHandler"><span class="type-signature"></span>startNameSpaceDeclHandler<span
465
+ class="type-signature"> :function</span></h4>
466
+ </dt>
467
+ <dd>
468
+ <div class="description">
469
+ This property holds a callback function with two parameters: prefix(String) and uri(String).
470
+ </div>
471
+ <h5>Type:</h5>
472
+ <ul>
473
+ <li>
474
+ <span class="param-type">function</span>
475
+ </li>
476
+ </ul>
477
+ <dl class="details">
478
+ </dl>
479
+ <h5>Example</h5>
480
+ <pre class="prettyprint"><code>parser.startNameSpaceDeclHandler = function(prefix, uri) {
481
+ // do some thing
482
+ }</code></pre>
483
+ </dd>
484
+ <dt>
485
+ <h4 class="name" id="xmlDeclHandler"><span class="type-signature"></span>xmlDeclHandler<span
486
+ class="type-signature"> :function</span></h4>
487
+ </dt>
488
+ <dd>
489
+ <div class="description">
490
+ This property holds a callback function with three parameters: version(String),
491
+ encoding(String), standalone(Integer).
492
+ </div>
493
+ <h5>Type:</h5>
494
+ <ul>
495
+ <li>
496
+ <span class="param-type">function</span>
497
+ </li>
498
+ </ul>
499
+ <dl class="details">
500
+ </dl>
501
+ <h5>Example</h5>
502
+ <pre class="prettyprint"><code>parser.xmlDeclHandler = function(version, encoding, standalone) {
503
+ // do some thing
504
+ }</code></pre>
505
+ </dd>
506
+ </dl>
507
+ <h3 class="subsection-title">Methods</h3>
508
+ <dl>
509
+ <dt>
510
+ <h4 class="name" id="parse"><span class="type-signature"></span>parse<span
511
+ class="signature">(xml) </span><span class="type-signature">-> { Promise }</span></h4>
512
+ </dt>
513
+ <dd>
514
+ <div class="description">
515
+ This method parses the xmlString.
516
+ </div>
517
+ <h5>Parameters:</h5>
518
+ <table class="params">
519
+ <thead>
520
+ <tr>
521
+ <th>Name</th>
522
+ <th>Type</th>
523
+ <th class="last">Description</th>
524
+ </tr>
525
+ </thead>
526
+ <tbody>
527
+ <tr>
528
+ <td class="name"><code>xml</code></td>
529
+ <td class="type">
530
+ <span class="param-type">String</span>
531
+ </td>
532
+ <td class="description last">data that should be parsed</td>
533
+ </tr>
534
+ </tbody>
535
+ </table>
536
+ <dl class="details">
537
+ </dl>
538
+ <h5>Throws:</h5>
539
+ <div class="param-desc">
540
+ Throws an error if there was a problem during parsing or
541
+ the parser was stopped without the possibility of resuming
542
+ </div>
543
+ <h5>Example</h5>
544
+ <pre class="prettyprint"><code>var xmlString = //Some xml
545
+ var parser = new $.util.SAXParser()
546
+
547
+ //... set handlers
548
+
549
+ <b>await </b>parser.parse(xmlString);</code></pre>
550
+ </dd>
551
+ <dt>
552
+ <h4 class="name" id="parse"><span class="type-signature"></span>parse<span
553
+ class="signature">(xml, <span class="optional">encoding</span>) </span><span
554
+ class="type-signature">-> { Promise }</span></h4>
555
+ </dt>
556
+ <dd>
557
+ <div class="description">
558
+ This method parses the xmlArrayBuffer.
559
+ </div>
560
+ <h5>Parameters:</h5>
561
+ <table class="params">
562
+ <thead>
563
+ <tr>
564
+ <th>Name</th>
565
+ <th>Type</th>
566
+ <th>Argument</th>
567
+ <th class="last">Description</th>
568
+ </tr>
569
+ </thead>
570
+ <tbody>
571
+ <tr>
572
+ <td class="name"><code>xml</code></td>
573
+ <td class="type">
574
+ <span class="param-type">ArrayBuffer</span>
575
+ </td>
576
+ <td class="attributes">
577
+ </td>
578
+ <td class="description last">data that should be parsed</td>
579
+ </tr>
580
+ <tr>
581
+ <td class="name"><code>encoding</code></td>
582
+ <td class="type">
583
+ <span class="param-type">String</span>
584
+ </td>
585
+ <td class="attributes">
586
+ &lt;optional><br>
587
+ </td>
588
+ <td class="description last">supported encodings are UTF-8, UTF-16 and US-ASCII. The default
589
+ is UTF-8.
590
+ </td>
591
+ </tr>
592
+ </tbody>
593
+ </table>
594
+ <dl class="details">
595
+ </dl>
596
+ <h5>Throws:</h5>
597
+ <div class="param-desc">
598
+ Throws an error if there was a problem during parsing or
599
+ the parser was stopped without the possibility of resuming
600
+ </div>
601
+ <h5>Example</h5>
602
+ <pre class="prettyprint"><code>var xmlArrayBuffer = //Some xml
603
+ var parser = new $.util.SAXParser()
604
+
605
+ //... set handlers
606
+
607
+ <b>await </b>parser.parse(xmlArrayBuffer);</code></pre>
608
+ </dd>
609
+ <dt>
610
+ <h4 class="name" id="parse"><span class="type-signature"></span>parse<span
611
+ class="signature">(xml, <span class="optional">encoding</span>) </span><span
612
+ class="type-signature">-> { Promise }</span></h4>
613
+ </dt>
614
+ <dd>
615
+ <div class="description">
616
+ This method parses the content of a $.web.Body object.
617
+ </div>
618
+ <h5>Parameters:</h5>
619
+ <table class="params">
620
+ <thead>
621
+ <tr>
622
+ <th>Name</th>
623
+ <th>Type</th>
624
+ <th>Argument</th>
625
+ <th class="last">Description</th>
626
+ </tr>
627
+ </thead>
628
+ <tbody>
629
+ <tr>
630
+ <td class="name"><code>xml</code></td>
631
+ <td class="type">
632
+ <span class="param-type"><a href="$.web.Body.html">$.web.Body</a></span>
633
+ </td>
634
+ <td class="attributes">
635
+ </td>
636
+ <td class="description last">data that should be parsed. The body should contain the XML.
637
+ Otherwise the parser throws an error.
638
+ </td>
639
+ </tr>
640
+ <tr>
641
+ <td class="name"><code>encoding</code></td>
642
+ <td class="type">
643
+ <span class="param-type">String</span>
644
+ </td>
645
+ <td class="attributes">
646
+ &lt;optional><br>
647
+ </td>
648
+ <td class="description last">supported encodings are UTF-8, UTF-16 and US-ASCII. The default
649
+ is UTF-8.
650
+ </td>
651
+ </tr>
652
+ </tbody>
653
+ </table>
654
+ <dl class="details">
655
+ </dl>
656
+ <h5>Throws:</h5>
657
+ <div class="param-desc">
658
+ Throws an error if there was a problem during parsing or
659
+ the parser was stopped without the possibility of resuming
660
+ </div>
661
+ <h5>Example</h5>
662
+ <pre class="prettyprint"><code>var body = $.request.body
663
+ var parser = new $.util.SAXParser()
664
+
665
+ //... set handlers
666
+
667
+ <b>await </b>parser.parse(body);</code></pre>
668
+ </dd>
669
+ <dt>
670
+ <h4 class="name" id="reset"><span class="type-signature"></span>reset<span
671
+ class="signature">()</span><span class="type-signature"></span></h4>
672
+ </dt>
673
+ <dd>
674
+ <div class="description">
675
+ This method resets the parser.
676
+ </div>
677
+ <dl class="details">
678
+ </dl>
679
+ <h5>Example</h5>
680
+ <pre class="prettyprint"><code>var parser = new $.util.SAXParser()
681
+ // ...
682
+ <b>await </b>parser.parse(xmlString1);
683
+ parser.reset();
684
+ <b>await </b>parser.parse(xmlString2);</code></pre>
685
+ </dd>
686
+ <dt>
687
+ <h4 class="name" id="resume"><span class="type-signature"></span>resume<span
688
+ class="signature">()</span><span class="type-signature"></span></h4>
689
+ </dt>
690
+ <dd>
691
+ <div class="description">
692
+ This method resumes the parser. It should <b>not</b> be called from a callback function.
693
+ </div>
694
+ <dl class="details">
695
+ </dl>
696
+ <h5>Example</h5>
697
+ <pre class="prettyprint"><code>var parser = new $.util.SAXParser()
698
+ parser.startElementHandler = function(name, atts) {
699
+ //... some logic here
700
+ parser.stop(true);
701
+ //...
702
+ }
703
+ <b>await </b>parser.parse(xmlString);
704
+ parser.startElementHandler = function(name, atts) {
705
+ //... some other logic here
706
+ }
707
+ parser.resume();</code></pre>
708
+ </dd>
709
+ <dt>
710
+ <h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">(isResumable)</span><span
711
+ class="type-signature"></span></h4>
712
+ </dt>
713
+ <dd>
714
+ <div class="description">
715
+ This method stops the parser. It should be called from a callback function.
716
+ </div>
717
+ <h5>Parameters:</h5>
718
+ <table class="params">
719
+ <thead>
720
+ <tr>
721
+ <th>Name</th>
722
+ <th>Type</th>
723
+ <th class="last">Description</th>
724
+ </tr>
725
+ </thead>
726
+ <tbody>
727
+ <tr>
728
+ <td class="name"><code>isResumable</code></td>
729
+ <td class="type">
730
+ <span class="param-type">Boolean</span>
731
+ </td>
732
+ <td class="description last">if true than when called the parser is suspended and can be
733
+ resumed.
734
+ If false the parser cannot be resumed and an error is thrown.
735
+ </td>
736
+ </tr>
737
+ </tbody>
738
+ </table>
739
+ <dl class="details">
740
+ </dl>
741
+ <h5>Throws:</h5>
742
+ <div class="param-desc">
743
+ Throws an error if isResumable = false
744
+ </div>
745
+ <h5>Example</h5>
746
+ <pre class="prettyprint"><code>var parser = new $.util.SAXParser()
747
+ parser.startElementHandler = function(name, atts) {
748
+ //... some logic here
749
+ parser.stop(false);
750
+ //...
751
+ }
752
+ try {
753
+ <b>await </b>parser.parse(xmlString);
754
+ } catch(error) {
755
+ // handle parser.stop(false) error
756
+ }</code></pre>
757
+ </dd>
758
+ </dl>
759
+ </article>
760
+ </section>
761
+ </div>
762
+ <nav>
763
+ <h2><a href="index.html">Index</a></h2>
764
+ <h3>Classes</h3>
765
+ <table>
766
+ <tr>
767
+ <td><a href="$.security.AntiVirus.html">AntiVirus</a></td>
768
+ <td class="oblique">$.security</td>
769
+ </tr>
770
+ <tr>
771
+ <td><a href="$.Application.html">Application</a></td>
772
+ <td class="oblique">$</td>
773
+ </tr>
774
+ <tr>
775
+ <td><a href="$.web.Body.html">Body</a></td>
776
+ <td class="oblique">$.web</td>
777
+ </tr>
778
+ <tr>
779
+ <td><a href="$.db.CallableStatement.html">CallableStatement</a></td>
780
+ <td class="oblique">$.db</td>
781
+ </tr>
782
+ <tr>
783
+ <td><a href="$.net.http.Client.html">Client</a></td>
784
+ <td class="oblique">$.net.http</td>
785
+ </tr>
786
+ <tr>
787
+ <td><a href="$.hdb.ColumnMetadata.html">ColumnMetadata</a></td>
788
+ <td class="oblique">$.hdb</td>
789
+ </tr>
790
+ <tr>
791
+ <td><a href="$.db.Connection.html">Connection</a></td>
792
+ <td class="oblique">$.db</td>
793
+ </tr>
794
+ <tr>
795
+ <td><a href="$.hdb.Connection.html">Connection</a></td>
796
+ <td class="oblique">$.hdb</td>
797
+ </tr>
798
+ <tr>
799
+ <td><a href="$.net.Destination.html">Destination</a></td>
800
+ <td class="oblique">$.net</td>
801
+ </tr>
802
+ <tr>
803
+ <td><a href="$.net.http.Destination.html">Destination</a></td>
804
+ <td class="oblique">$.net.http</td>
805
+ </tr>
806
+ <tr>
807
+ <td><a href="$.web.EntityList.html">EntityList</a></td>
808
+ <td class="oblique">$.web</td>
809
+ </tr>
810
+ <tr>
811
+ <td><a href="$.jobs.Job.html">Job</a></td>
812
+ <td class="oblique">$.jobs</td>
813
+ </tr>
814
+ <tr>
815
+ <td><a href="$.jobs.JobLog.html">JobLog</a></td>
816
+ <td class="oblique">$.jobs</td>
817
+ </tr>
818
+ <tr>
819
+ <td><a href="$.jobs.JobSchedules.html">JobSchedules</a></td>
820
+ <td class="oblique">$.jobs</td>
821
+ </tr>
822
+ <tr>
823
+ <td><a href="$.net.Mail.html">Mail</a></td>
824
+ <td class="oblique">$.net</td>
825
+ </tr>
826
+ <tr>
827
+ <td><a href="$.db.ParameterMetaData.html">ParameterMetaData</a></td>
828
+ <td class="oblique">$.db</td>
829
+ </tr>
830
+ <tr>
831
+ <td><a href="$.net.Mail.Part.html">Part</a></td>
832
+ <td class="oblique">$.net.Mail</td>
833
+ </tr>
834
+ <tr>
835
+ <td><a href="$.db.PreparedStatement.html">PreparedStatement</a></td>
836
+ <td class="oblique">$.db</td>
837
+ </tr>
838
+ <tr>
839
+ <td><a href="$.hdb.ProcedureResult.html">ProcedureResult</a></td>
840
+ <td class="oblique">$.hdb</td>
841
+ </tr>
842
+ <tr>
843
+ <td><a href="$.net.http.Request.html">Request</a></td>
844
+ <td class="oblique">$.net.http</td>
845
+ </tr>
846
+ <tr>
847
+ <td><a href="$.db.ResultSet.html">ResultSet</a></td>
848
+ <td class="oblique">$.db</td>
849
+ </tr>
850
+ <tr>
851
+ <td><a href="$.hdb.ResultSet.html">ResultSet</a></td>
852
+ <td class="oblique">$.hdb</td>
853
+ </tr>
854
+ <tr>
855
+ <td><a href="$.hdb.ResultSetIterator.html">ResultSetIterator</a></td>
856
+ <td class="oblique">$.hdb</td>
857
+ </tr>
858
+ <tr>
859
+ <td><a href="$.db.ResultSetMetaData.html">ResultSetMetaData</a></td>
860
+ <td class="oblique">$.db</td>
861
+ </tr>
862
+ <tr>
863
+ <td><a href="$.hdb.ResultSetMetaData.html">ResultSetMetaData</a></td>
864
+ <td class="oblique">$.hdb</td>
865
+ </tr>
866
+ <tr>
867
+ <td><a href="$.util.SAXParser.html">SAXParser</a></td>
868
+ <td class="oblique">$.util</td>
869
+ </tr>
870
+ <tr>
871
+ <td><a href="$.Session.html">Session</a></td>
872
+ <td class="oblique">$</td>
873
+ </tr>
874
+ <tr>
875
+ <td><a href="$.text.analysis.Session.html">Session</a></td>
876
+ <td class="oblique">$.text.analysis</td>
877
+ </tr>
878
+ <tr>
879
+ <td><a href="$.text.mining.Session.html">Session</a></td>
880
+ <td class="oblique">$.text.mining</td>
881
+ </tr>
882
+ <tr>
883
+ <td><a href="$.net.SMTPConnection.html">SMTPConnection</a></td>
884
+ <td class="oblique">$.net</td>
885
+ </tr>
886
+ <tr>
887
+ <td><a href="$.db.SQLException.html">SQLException</a></td>
888
+ <td class="oblique">$.db</td>
889
+ </tr>
890
+ <tr>
891
+ <td><a href="$.hdb.SQLException.html">SQLException</a></td>
892
+ <td class="oblique">$.hdb</td>
893
+ </tr>
894
+ <tr>
895
+ <td><a href="$.security.Store.html">Store</a></td>
896
+ <td class="oblique">$.security</td>
897
+ </tr>
898
+ <tr>
899
+ <td><a href="$.web.TupelList.html">TupelList</a></td>
900
+ <td class="oblique">$.web</td>
901
+ </tr>
902
+ <tr>
903
+ <td><a href="$.web.WebEntityRequest.html">WebEntityRequest</a></td>
904
+ <td class="oblique">$.web</td>
905
+ </tr>
906
+ <tr>
907
+ <td><a href="$.web.WebEntityResponse.html">WebEntityResponse</a></td>
908
+ <td class="oblique">$.web</td>
909
+ </tr>
910
+ <tr>
911
+ <td><a href="$.web.WebRequest.html">WebRequest</a></td>
912
+ <td class="oblique">$.web</td>
913
+ </tr>
914
+ <tr>
915
+ <td><a href="$.web.WebResponse.html">WebResponse</a></td>
916
+ <td class="oblique">$.web</td>
917
+ </tr>
918
+ <tr>
919
+ <td><a href="$.util.Zip.html">Zip</a></td>
920
+ <td class="oblique">$.util</td>
921
+ </tr>
922
+ </table>
923
+ <h3>Namespaces</h3>
924
+ <ul>
925
+ <li><a href="$.html"><span class="oblique"></span>$</a></li>
926
+ <li><a href="$.db.html"><span class="oblique">$.</span>db</a></li>
927
+ <li><a href="$.hdb.html"><span class="oblique">$.</span>hdb</a></li>
928
+ <li><a href="$.jobs.html"><span class="oblique">$.</span>jobs</a></li>
929
+ <li><a href="$.net.html"><span class="oblique">$.</span>net</a></li>
930
+ <li><a href="$.net.http.html"><span class="oblique">$.net.</span>http</a></li>
931
+ <li><a href="$.security.html"><span class="oblique">$.</span>security</a></li>
932
+ <li><a href="$.security.crypto.html"><span class="oblique">$.security.</span>crypto</a></li>
933
+ <li><a href="$.security.x509.html"><span class="oblique">$.security.</span>x509</a></li>
934
+ <li><a href="$.text.html"><span class="oblique">$.</span>text</a></li>
935
+ <li><a href="$.text.analysis.html"><span class="oblique">$.text.</span>analysis</a></li>
936
+ <li><a href="$.text.mining.html"><span class="oblique">$.text.</span>mining</a></li>
937
+ <li><a href="$.trace.html"><span class="oblique">$.</span>trace</a></li>
938
+ <li><a href="$.util.html"><span class="oblique">$.</span>util</a></li>
939
+ <li><a href="$.util.codec.html"><span class="oblique">$.util.</span>codec</a></li>
940
+ <li><a href="$.util.compression.html"><span class="oblique">$.util.</span>compression</a></li>
941
+ <li><a href="$.util.sql.html"><span class="oblique">$.util.</span>sql</a></li>
942
+ <li><a href="$.web.html"><span class="oblique">$.</span>web</a></li>
943
+ </ul>
944
+ </nav>
945
+ <br clear="both">
946
+ <footer>
947
+ <a href="Copyright-SAP.html">Copyright</a>
948
+ &
949
+ <a href="Disclaimer-SAP.html">Disclaimer</a>
950
+ </footer>
951
+ <script>prettyPrint();</script>
952
+ <script src="scripts/linenumber.js"></script>
953
+ </body>
954
+
955
+ </html>