@zowe/cics-for-zowe-cli 6.2.2 → 6.2.4

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 (195) hide show
  1. package/npm-shrinkwrap.json +13 -17
  2. package/package.json +2 -5
  3. package/node_modules/@zowe/cics-for-zowe-sdk/LICENSE +0 -277
  4. package/node_modules/@zowe/cics-for-zowe-sdk/README.md +0 -161
  5. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.constants.d.ts +0 -84
  6. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.constants.js +0 -91
  7. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.constants.js.map +0 -1
  8. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.messages.d.ts +0 -17
  9. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.messages.js +0 -22
  10. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/CicsCmci.messages.js.map +0 -1
  11. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/index.d.ts +0 -12
  12. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/index.js +0 -29
  13. package/node_modules/@zowe/cics-for-zowe-sdk/lib/constants/index.js.map +0 -1
  14. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICMCIApiResponse.d.ts +0 -33
  15. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICMCIApiResponse.js +0 -13
  16. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICMCIApiResponse.js.map +0 -1
  17. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICMCIResponseResultSummary.d.ts +0 -28
  18. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICMCIResponseResultSummary.js +0 -13
  19. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICMCIResponseResultSummary.js.map +0 -1
  20. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICSDGroupParms.d.ts +0 -30
  21. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICSDGroupParms.js +0 -13
  22. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICSDGroupParms.js.map +0 -1
  23. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICacheParms.d.ts +0 -17
  24. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICacheParms.js +0 -13
  25. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ICacheParms.js.map +0 -1
  26. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IGetResourceUriOptions.d.ts +0 -42
  27. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IGetResourceUriOptions.js +0 -13
  28. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IGetResourceUriOptions.js.map +0 -1
  29. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IProgramParms.d.ts +0 -30
  30. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IProgramParms.js +0 -13
  31. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IProgramParms.js.map +0 -1
  32. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResourceParms.d.ts +0 -17
  33. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResourceParms.js +0 -13
  34. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResourceParms.js.map +0 -1
  35. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResourceQueryParms.d.ts +0 -24
  36. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResourceQueryParms.js +0 -13
  37. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResourceQueryParms.js.map +0 -1
  38. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResultCacheParms.d.ts +0 -21
  39. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResultCacheParms.js +0 -13
  40. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IResultCacheParms.js.map +0 -1
  41. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ITransactionParms.d.ts +0 -35
  42. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ITransactionParms.js +0 -13
  43. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/ITransactionParms.js.map +0 -1
  44. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IURIMapParms.d.ts +0 -89
  45. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IURIMapParms.js +0 -13
  46. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IURIMapParms.js.map +0 -1
  47. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IWebServiceParms.d.ts +0 -55
  48. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IWebServiceParms.js +0 -13
  49. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/IWebServiceParms.js.map +0 -1
  50. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/index.d.ts +0 -22
  51. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/index.js +0 -39
  52. package/node_modules/@zowe/cics-for-zowe-sdk/lib/doc/index.js.map +0 -1
  53. package/node_modules/@zowe/cics-for-zowe-sdk/lib/index.d.ts +0 -15
  54. package/node_modules/@zowe/cics-for-zowe-sdk/lib/index.js +0 -32
  55. package/node_modules/@zowe/cics-for-zowe-sdk/lib/index.js.map +0 -1
  56. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/add-to-list/AddToList.d.ts +0 -23
  57. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/add-to-list/AddToList.js +0 -57
  58. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/add-to-list/AddToList.js.map +0 -1
  59. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/add-to-list/index.d.ts +0 -11
  60. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/add-to-list/index.js +0 -28
  61. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/add-to-list/index.js.map +0 -1
  62. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/cache/Cache.d.ts +0 -14
  63. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/cache/Cache.js +0 -30
  64. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/cache/Cache.js.map +0 -1
  65. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/cache/index.d.ts +0 -11
  66. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/cache/index.js +0 -28
  67. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/cache/index.js.map +0 -1
  68. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/define/Define.d.ts +0 -85
  69. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/define/Define.js +0 -301
  70. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/define/Define.js.map +0 -1
  71. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/define/index.d.ts +0 -11
  72. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/define/index.js +0 -28
  73. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/define/index.js.map +0 -1
  74. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/delete/Delete.d.ts +0 -58
  75. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/delete/Delete.js +0 -120
  76. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/delete/Delete.js.map +0 -1
  77. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/delete/index.d.ts +0 -11
  78. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/delete/index.js +0 -28
  79. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/delete/index.js.map +0 -1
  80. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/disable/Disable.d.ts +0 -24
  81. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/disable/Disable.js +0 -53
  82. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/disable/Disable.js.map +0 -1
  83. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/disable/index.d.ts +0 -11
  84. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/disable/index.js +0 -28
  85. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/disable/index.js.map +0 -1
  86. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/discard/Discard.d.ts +0 -35
  87. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/discard/Discard.js +0 -77
  88. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/discard/Discard.js.map +0 -1
  89. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/discard/index.d.ts +0 -11
  90. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/discard/index.js +0 -28
  91. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/discard/index.js.map +0 -1
  92. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/enable/Enable.d.ts +0 -24
  93. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/enable/Enable.js +0 -53
  94. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/enable/Enable.js.map +0 -1
  95. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/enable/index.d.ts +0 -11
  96. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/enable/index.js +0 -28
  97. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/enable/index.js.map +0 -1
  98. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/get/Get.d.ts +0 -23
  99. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/get/Get.js +0 -41
  100. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/get/Get.js.map +0 -1
  101. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/get/index.d.ts +0 -11
  102. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/get/index.js +0 -28
  103. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/get/index.js.map +0 -1
  104. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/index.d.ts +0 -21
  105. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/index.js +0 -38
  106. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/index.js.map +0 -1
  107. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/install/Install.d.ts +0 -48
  108. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/install/Install.js +0 -123
  109. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/install/Install.js.map +0 -1
  110. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/install/index.d.ts +0 -11
  111. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/install/index.js +0 -28
  112. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/install/index.js.map +0 -1
  113. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/remove-from-list/RemoveFromList.d.ts +0 -23
  114. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/remove-from-list/RemoveFromList.js +0 -42
  115. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/remove-from-list/RemoveFromList.js.map +0 -1
  116. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/remove-from-list/index.d.ts +0 -11
  117. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/remove-from-list/index.js +0 -28
  118. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/remove-from-list/index.js.map +0 -1
  119. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/set/Set.d.ts +0 -23
  120. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/set/Set.js +0 -50
  121. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/set/Set.js.map +0 -1
  122. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/set/index.d.ts +0 -11
  123. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/set/index.js +0 -28
  124. package/node_modules/@zowe/cics-for-zowe-sdk/lib/methods/set/index.js.map +0 -1
  125. package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestClient.d.ts +0 -128
  126. package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestClient.js +0 -220
  127. package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/CicsCmciRestClient.js.map +0 -1
  128. package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/index.d.ts +0 -11
  129. package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/index.js +0 -28
  130. package/node_modules/@zowe/cics-for-zowe-sdk/lib/rest/index.js.map +0 -1
  131. package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/Utils.d.ts +0 -27
  132. package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/Utils.js +0 -80
  133. package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/Utils.js.map +0 -1
  134. package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/index.d.ts +0 -11
  135. package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/index.js +0 -28
  136. package/node_modules/@zowe/cics-for-zowe-sdk/lib/utils/index.js.map +0 -1
  137. package/node_modules/@zowe/cics-for-zowe-sdk/package.json +0 -54
  138. package/node_modules/sax/LICENSE +0 -41
  139. package/node_modules/sax/README.md +0 -228
  140. package/node_modules/sax/lib/sax.js +0 -1597
  141. package/node_modules/sax/package.json +0 -29
  142. package/node_modules/xml2js/LICENSE +0 -19
  143. package/node_modules/xml2js/README.md +0 -507
  144. package/node_modules/xml2js/lib/bom.js +0 -12
  145. package/node_modules/xml2js/lib/builder.js +0 -127
  146. package/node_modules/xml2js/lib/defaults.js +0 -72
  147. package/node_modules/xml2js/lib/parser.js +0 -385
  148. package/node_modules/xml2js/lib/processors.js +0 -34
  149. package/node_modules/xml2js/lib/xml2js.js +0 -39
  150. package/node_modules/xml2js/node_modules/xmlbuilder/CHANGELOG.md +0 -470
  151. package/node_modules/xml2js/node_modules/xmlbuilder/LICENSE +0 -21
  152. package/node_modules/xml2js/node_modules/xmlbuilder/README.md +0 -86
  153. package/node_modules/xml2js/node_modules/xmlbuilder/appveyor.yml +0 -20
  154. package/node_modules/xml2js/node_modules/xmlbuilder/lib/Derivation.js +0 -10
  155. package/node_modules/xml2js/node_modules/xmlbuilder/lib/DocumentPosition.js +0 -12
  156. package/node_modules/xml2js/node_modules/xmlbuilder/lib/NodeType.js +0 -23
  157. package/node_modules/xml2js/node_modules/xmlbuilder/lib/OperationType.js +0 -11
  158. package/node_modules/xml2js/node_modules/xmlbuilder/lib/Utility.js +0 -83
  159. package/node_modules/xml2js/node_modules/xmlbuilder/lib/WriterState.js +0 -10
  160. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLAttribute.js +0 -108
  161. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCData.js +0 -36
  162. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLCharacterData.js +0 -79
  163. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLComment.js +0 -36
  164. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMConfiguration.js +0 -64
  165. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js +0 -16
  166. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMImplementation.js +0 -32
  167. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDOMStringList.js +0 -28
  168. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDAttList.js +0 -55
  169. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDElement.js +0 -38
  170. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDEntity.js +0 -97
  171. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDTDNotation.js +0 -52
  172. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDeclaration.js +0 -43
  173. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocType.js +0 -186
  174. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocument.js +0 -242
  175. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentCB.js +0 -528
  176. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDocumentFragment.js +0 -24
  177. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLDummy.js +0 -31
  178. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLElement.js +0 -298
  179. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNamedNodeMap.js +0 -58
  180. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNode.js +0 -785
  181. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeFilter.js +0 -48
  182. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLNodeList.js +0 -28
  183. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +0 -49
  184. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLRaw.js +0 -35
  185. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStreamWriter.js +0 -176
  186. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringWriter.js +0 -35
  187. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLStringifier.js +0 -240
  188. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLText.js +0 -69
  189. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLTypeInfo.js +0 -21
  190. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLUserDataHandler.js +0 -16
  191. package/node_modules/xml2js/node_modules/xmlbuilder/lib/XMLWriterBase.js +0 -428
  192. package/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js +0 -65
  193. package/node_modules/xml2js/node_modules/xmlbuilder/package.json +0 -39
  194. package/node_modules/xml2js/node_modules/xmlbuilder/typings/index.d.ts +0 -153
  195. package/node_modules/xml2js/package.json +0 -93
@@ -1,29 +0,0 @@
1
- {
2
- "name": "sax",
3
- "description": "An evented streaming XML parser in JavaScript",
4
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
5
- "version": "1.4.1",
6
- "main": "lib/sax.js",
7
- "license": "ISC",
8
- "scripts": {
9
- "test": "tap test/*.js --cov -j4",
10
- "preversion": "npm test",
11
- "postversion": "npm publish",
12
- "postpublish": "git push origin --all; git push origin --tags"
13
- },
14
- "repository": "git://github.com/isaacs/sax-js.git",
15
- "files": [
16
- "lib/sax.js",
17
- "LICENSE",
18
- "README.md"
19
- ],
20
- "devDependencies": {
21
- "tap": "^15.1.6"
22
- },
23
- "tap": {
24
- "statements": 79,
25
- "branches": 75,
26
- "functions": 80,
27
- "lines": 79
28
- }
29
- }
@@ -1,19 +0,0 @@
1
- Copyright 2010, 2011, 2012, 2013. All rights reserved.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- IN THE SOFTWARE.
@@ -1,507 +0,0 @@
1
- node-xml2js
2
- ===========
3
-
4
- Ever had the urge to parse XML? And wanted to access the data in some sane,
5
- easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is
6
- what you're looking for!
7
-
8
- Description
9
- ===========
10
-
11
- Simple XML to JavaScript object converter. It supports bi-directional conversion.
12
- Uses [sax-js](https://github.com/isaacs/sax-js/) and
13
- [xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js/).
14
-
15
- Note: If you're looking for a full DOM parser, you probably want
16
- [JSDom](https://github.com/tmpvar/jsdom).
17
-
18
- Installation
19
- ============
20
-
21
- Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm
22
- install xml2js` which will download xml2js and all dependencies.
23
-
24
- xml2js is also available via [Bower](http://bower.io/), just `bower install
25
- xml2js` which will download xml2js and all dependencies.
26
-
27
- Usage
28
- =====
29
-
30
- No extensive tutorials required because you are a smart developer! The task of
31
- parsing XML should be an easy one, so let's make it so! Here's some examples.
32
-
33
- Shoot-and-forget usage
34
- ----------------------
35
-
36
- You want to parse XML as simple and easy as possible? It's dangerous to go
37
- alone, take this:
38
-
39
- ```javascript
40
- var parseString = require('xml2js').parseString;
41
- var xml = "<root>Hello xml2js!</root>"
42
- parseString(xml, function (err, result) {
43
- console.dir(result);
44
- });
45
- ```
46
-
47
- Can't get easier than this, right? This works starting with `xml2js` 0.2.3.
48
- With CoffeeScript it looks like this:
49
-
50
- ```coffeescript
51
- {parseString} = require 'xml2js'
52
- xml = "<root>Hello xml2js!</root>"
53
- parseString xml, (err, result) ->
54
- console.dir result
55
- ```
56
-
57
- If you need some special options, fear not, `xml2js` supports a number of
58
- options (see below), you can specify these as second argument:
59
-
60
- ```javascript
61
- parseString(xml, {trim: true}, function (err, result) {
62
- });
63
- ```
64
-
65
- Simple as pie usage
66
- -------------------
67
-
68
- That's right, if you have been using xml-simple or a home-grown
69
- wrapper, this was added in 0.1.11 just for you:
70
-
71
- ```javascript
72
- var fs = require('fs'),
73
- xml2js = require('xml2js');
74
-
75
- var parser = new xml2js.Parser();
76
- fs.readFile(__dirname + '/foo.xml', function(err, data) {
77
- parser.parseString(data, function (err, result) {
78
- console.dir(result);
79
- console.log('Done');
80
- });
81
- });
82
- ```
83
-
84
- Look ma, no event listeners!
85
-
86
- You can also use `xml2js` from
87
- [CoffeeScript](https://github.com/jashkenas/coffeescript), further reducing
88
- the clutter:
89
-
90
- ```coffeescript
91
- fs = require 'fs',
92
- xml2js = require 'xml2js'
93
-
94
- parser = new xml2js.Parser()
95
- fs.readFile __dirname + '/foo.xml', (err, data) ->
96
- parser.parseString data, (err, result) ->
97
- console.dir result
98
- console.log 'Done.'
99
- ```
100
-
101
- But what happens if you forget the `new` keyword to create a new `Parser`? In
102
- the middle of a nightly coding session, it might get lost, after all. Worry
103
- not, we got you covered! Starting with 0.2.8 you can also leave it out, in
104
- which case `xml2js` will helpfully add it for you, no bad surprises and
105
- inexplicable bugs!
106
-
107
- Promise usage
108
- -------------
109
-
110
- ```javascript
111
- var xml2js = require('xml2js');
112
- var xml = '<foo></foo>';
113
-
114
- // With parser
115
- var parser = new xml2js.Parser(/* options */);
116
- parser.parseStringPromise(xml).then(function (result) {
117
- console.dir(result);
118
- console.log('Done');
119
- })
120
- .catch(function (err) {
121
- // Failed
122
- });
123
-
124
- // Without parser
125
- xml2js.parseStringPromise(xml /*, options */).then(function (result) {
126
- console.dir(result);
127
- console.log('Done');
128
- })
129
- .catch(function (err) {
130
- // Failed
131
- });
132
- ```
133
-
134
- Parsing multiple files
135
- ----------------------
136
-
137
- If you want to parse multiple files, you have multiple possibilities:
138
-
139
- * You can create one `xml2js.Parser` per file. That's the recommended one
140
- and is promised to always *just work*.
141
- * You can call `reset()` on your parser object.
142
- * You can hope everything goes well anyway. This behaviour is not
143
- guaranteed work always, if ever. Use option #1 if possible. Thanks!
144
-
145
- So you wanna some JSON?
146
- -----------------------
147
-
148
- Just wrap the `result` object in a call to `JSON.stringify` like this
149
- `JSON.stringify(result)`. You get a string containing the JSON representation
150
- of the parsed object that you can feed to JSON-hungry consumers.
151
-
152
- Displaying results
153
- ------------------
154
-
155
- You might wonder why, using `console.dir` or `console.log` the output at some
156
- level is only `[Object]`. Don't worry, this is not because `xml2js` got lazy.
157
- That's because Node uses `util.inspect` to convert the object into strings and
158
- that function stops after `depth=2` which is a bit low for most XML.
159
-
160
- To display the whole deal, you can use `console.log(util.inspect(result, false,
161
- null))`, which displays the whole result.
162
-
163
- So much for that, but what if you use
164
- [eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it
165
- truncates the output with `…`? Don't fear, there's also a solution for that,
166
- you just need to increase the `maxLength` limit by creating a custom inspector
167
- `var inspect = require('eyes').inspector({maxLength: false})` and then you can
168
- easily `inspect(result)`.
169
-
170
- XML builder usage
171
- -----------------
172
-
173
- Since 0.4.0, objects can be also be used to build XML:
174
-
175
- ```javascript
176
- var xml2js = require('xml2js');
177
-
178
- var obj = {name: "Super", Surname: "Man", age: 23};
179
-
180
- var builder = new xml2js.Builder();
181
- var xml = builder.buildObject(obj);
182
- ```
183
- will result in:
184
-
185
- ```xml
186
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
187
- <root>
188
- <name>Super</name>
189
- <Surname>Man</Surname>
190
- <age>23</age>
191
- </root>
192
- ```
193
-
194
- At the moment, a one to one bi-directional conversion is guaranteed only for
195
- default configuration, except for `attrkey`, `charkey` and `explicitArray` options
196
- you can redefine to your taste. Writing CDATA is supported via setting the `cdata`
197
- option to `true`.
198
-
199
- To specify attributes:
200
- ```javascript
201
- var xml2js = require('xml2js');
202
-
203
- var obj = {root: {$: {id: "my id"}, _: "my inner text"}};
204
-
205
- var builder = new xml2js.Builder();
206
- var xml = builder.buildObject(obj);
207
- ```
208
- will result in:
209
- ```xml
210
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
211
- <root id="my id">my inner text</root>
212
- ```
213
-
214
- ### Adding xmlns attributes
215
-
216
- You can generate XML that declares XML namespace prefix / URI pairs with xmlns attributes.
217
-
218
- Example declaring a default namespace on the root element:
219
-
220
- ```javascript
221
- let obj = {
222
- Foo: {
223
- $: {
224
- "xmlns": "http://foo.com"
225
- }
226
- }
227
- };
228
- ```
229
- Result of `buildObject(obj)`:
230
- ```xml
231
- <Foo xmlns="http://foo.com"/>
232
- ```
233
- Example declaring non-default namespaces on non-root elements:
234
- ```javascript
235
- let obj = {
236
- 'foo:Foo': {
237
- $: {
238
- 'xmlns:foo': 'http://foo.com'
239
- },
240
- 'bar:Bar': {
241
- $: {
242
- 'xmlns:bar': 'http://bar.com'
243
- }
244
- }
245
- }
246
- }
247
- ```
248
- Result of `buildObject(obj)`:
249
- ```xml
250
- <foo:Foo xmlns:foo="http://foo.com">
251
- <bar:Bar xmlns:bar="http://bar.com"/>
252
- </foo:Foo>
253
- ```
254
-
255
-
256
- Processing attribute, tag names and values
257
- ------------------------------------------
258
-
259
- Since 0.4.1 you can optionally provide the parser with attribute name and tag name processors as well as element value processors (Since 0.4.14, you can also optionally provide the parser with attribute value processors):
260
-
261
- ```javascript
262
-
263
- function nameToUpperCase(name){
264
- return name.toUpperCase();
265
- }
266
-
267
- //transform all attribute and tag names and values to uppercase
268
- parseString(xml, {
269
- tagNameProcessors: [nameToUpperCase],
270
- attrNameProcessors: [nameToUpperCase],
271
- valueProcessors: [nameToUpperCase],
272
- attrValueProcessors: [nameToUpperCase]},
273
- function (err, result) {
274
- // processed data
275
- });
276
- ```
277
-
278
- The `tagNameProcessors` and `attrNameProcessors` options
279
- accept an `Array` of functions with the following signature:
280
-
281
- ```javascript
282
- function (name){
283
- //do something with `name`
284
- return name
285
- }
286
- ```
287
-
288
- The `attrValueProcessors` and `valueProcessors` options
289
- accept an `Array` of functions with the following signature:
290
-
291
- ```javascript
292
- function (value, name) {
293
- //`name` will be the node name or attribute name
294
- //do something with `value`, (optionally) dependent on the node/attr name
295
- return value
296
- }
297
- ```
298
-
299
- Some processors are provided out-of-the-box and can be found in `lib/processors.js`:
300
-
301
- - `normalize`: transforms the name to lowercase.
302
- (Automatically used when `options.normalize` is set to `true`)
303
-
304
- - `firstCharLowerCase`: transforms the first character to lower case.
305
- E.g. 'MyTagName' becomes 'myTagName'
306
-
307
- - `stripPrefix`: strips the xml namespace prefix. E.g `<foo:Bar/>` will become 'Bar'.
308
- (N.B.: the `xmlns` prefix is NOT stripped.)
309
-
310
- - `parseNumbers`: parses integer-like strings as integers and float-like strings as floats
311
- E.g. "0" becomes 0 and "15.56" becomes 15.56
312
-
313
- - `parseBooleans`: parses boolean-like strings to booleans
314
- E.g. "true" becomes true and "False" becomes false
315
-
316
- Options
317
- =======
318
-
319
- Apart from the default settings, there are a number of options that can be
320
- specified for the parser. Options are specified by ``new Parser({optionName:
321
- value})``. Possible options are:
322
-
323
- * `attrkey` (default: `$`): Prefix that is used to access the attributes.
324
- Version 0.1 default was `@`.
325
- * `charkey` (default: `_`): Prefix that is used to access the character
326
- content. Version 0.1 default was `#`.
327
- * `explicitCharkey` (default: `false`) Determines whether or not to use
328
- a `charkey` prefix for elements with no attributes.
329
- * `trim` (default: `false`): Trim the whitespace at the beginning and end of
330
- text nodes.
331
- * `normalizeTags` (default: `false`): Normalize all tag names to lowercase.
332
- * `normalize` (default: `false`): Trim whitespaces inside text nodes.
333
- * `explicitRoot` (default: `true`): Set this if you want to get the root
334
- node in the resulting object.
335
- * `emptyTag` (default: `''`): what will the value of empty nodes be. In case
336
- you want to use an empty object as a default value, it is better to provide a factory
337
- function `() => ({})` instead. Without this function a plain object would
338
- become a shared reference across all occurrences with unwanted behavior.
339
- * `explicitArray` (default: `true`): Always put child nodes in an array if
340
- true; otherwise an array is created only if there is more than one.
341
- * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create
342
- text nodes.
343
- * `mergeAttrs` (default: `false`): Merge attributes and child elements as
344
- properties of the parent, instead of keying attributes off a child
345
- attribute object. This option is ignored if `ignoreAttrs` is `true`.
346
- * `validator` (default `null`): You can specify a callable that validates
347
- the resulting structure somehow, however you want. See unit tests
348
- for an example.
349
- * `xmlns` (default `false`): Give each element a field usually called '$ns'
350
- (the first character is the same as attrkey) that contains its local name
351
- and namespace URI.
352
- * `explicitChildren` (default `false`): Put child elements to separate
353
- property. Doesn't work with `mergeAttrs = true`. If element has no children
354
- then "children" won't be created. Added in 0.2.5.
355
- * `childkey` (default `$$`): Prefix that is used to access child elements if
356
- `explicitChildren` is set to `true`. Added in 0.2.5.
357
- * `preserveChildrenOrder` (default `false`): Modifies the behavior of
358
- `explicitChildren` so that the value of the "children" property becomes an
359
- ordered array. When this is `true`, every node will also get a `#name` field
360
- whose value will correspond to the XML nodeName, so that you may iterate
361
- the "children" array and still be able to determine node names. The named
362
- (and potentially unordered) properties are also retained in this
363
- configuration at the same level as the ordered "children" array. Added in
364
- 0.4.9.
365
- * `charsAsChildren` (default `false`): Determines whether chars should be
366
- considered children if `explicitChildren` is on. Added in 0.2.5.
367
- * `includeWhiteChars` (default `false`): Determines whether whitespace-only
368
- text nodes should be included. Added in 0.4.17.
369
- * `async` (default `false`): Should the callbacks be async? This *might* be
370
- an incompatible change if your code depends on sync execution of callbacks.
371
- Future versions of `xml2js` might change this default, so the recommendation
372
- is to not depend on sync execution anyway. Added in 0.2.6.
373
- * `strict` (default `true`): Set sax-js to strict or non-strict parsing mode.
374
- Defaults to `true` which is *highly* recommended, since parsing HTML which
375
- is not well-formed XML might yield just about anything. Added in 0.2.7.
376
- * `attrNameProcessors` (default: `null`): Allows the addition of attribute
377
- name processing functions. Accepts an `Array` of functions with following
378
- signature:
379
- ```javascript
380
- function (name){
381
- //do something with `name`
382
- return name
383
- }
384
- ```
385
- Added in 0.4.14
386
- * `attrValueProcessors` (default: `null`): Allows the addition of attribute
387
- value processing functions. Accepts an `Array` of functions with following
388
- signature:
389
- ```javascript
390
- function (value, name){
391
- //do something with `name`
392
- return name
393
- }
394
- ```
395
- Added in 0.4.1
396
- * `tagNameProcessors` (default: `null`): Allows the addition of tag name
397
- processing functions. Accepts an `Array` of functions with following
398
- signature:
399
- ```javascript
400
- function (name){
401
- //do something with `name`
402
- return name
403
- }
404
- ```
405
- Added in 0.4.1
406
- * `valueProcessors` (default: `null`): Allows the addition of element value
407
- processing functions. Accepts an `Array` of functions with following
408
- signature:
409
- ```javascript
410
- function (value, name){
411
- //do something with `name`
412
- return name
413
- }
414
- ```
415
- Added in 0.4.6
416
-
417
- Options for the `Builder` class
418
- -------------------------------
419
- These options are specified by ``new Builder({optionName: value})``.
420
- Possible options are:
421
-
422
- * `attrkey` (default: `$`): Prefix that is used to access the attributes.
423
- Version 0.1 default was `@`.
424
- * `charkey` (default: `_`): Prefix that is used to access the character
425
- content. Version 0.1 default was `#`.
426
- * `rootName` (default `root` or the root key name): root element name to be used in case
427
- `explicitRoot` is `false` or to override the root element name.
428
- * `renderOpts` (default `{ 'pretty': true, 'indent': ' ', 'newline': '\n' }`):
429
- Rendering options for xmlbuilder-js.
430
- * pretty: prettify generated XML
431
- * indent: whitespace for indentation (only when pretty)
432
- * newline: newline char (only when pretty)
433
- * `xmldec` (default `{ 'version': '1.0', 'encoding': 'UTF-8', 'standalone': true }`:
434
- XML declaration attributes.
435
- * `xmldec.version` A version number string, e.g. 1.0
436
- * `xmldec.encoding` Encoding declaration, e.g. UTF-8
437
- * `xmldec.standalone` standalone document declaration: true or false
438
- * `doctype` (default `null`): optional DTD. Eg. `{'ext': 'hello.dtd'}`
439
- * `headless` (default: `false`): omit the XML header. Added in 0.4.3.
440
- * `allowSurrogateChars` (default: `false`): allows using characters from the Unicode
441
- surrogate blocks.
442
- * `cdata` (default: `false`): wrap text nodes in `<![CDATA[ ... ]]>` instead of
443
- escaping when necessary. Does not add `<![CDATA[ ... ]]>` if it is not required.
444
- Added in 0.4.5.
445
-
446
- `renderOpts`, `xmldec`,`doctype` and `headless` pass through to
447
- [xmlbuilder-js](https://github.com/oozcitak/xmlbuilder-js).
448
-
449
- Updating to new version
450
- =======================
451
-
452
- Version 0.2 changed the default parsing settings, but version 0.1.14 introduced
453
- the default settings for version 0.2, so these settings can be tried before the
454
- migration.
455
-
456
- ```javascript
457
- var xml2js = require('xml2js');
458
- var parser = new xml2js.Parser(xml2js.defaults["0.2"]);
459
- ```
460
-
461
- To get the 0.1 defaults in version 0.2 you can just use
462
- `xml2js.defaults["0.1"]` in the same place. This provides you with enough time
463
- to migrate to the saner way of parsing in `xml2js` 0.2. We try to make the
464
- migration as simple and gentle as possible, but some breakage cannot be
465
- avoided.
466
-
467
- So, what exactly did change and why? In 0.2 we changed some defaults to parse
468
- the XML in a more universal and sane way. So we disabled `normalize` and `trim`
469
- so `xml2js` does not cut out any text content. You can reenable this at will of
470
- course. A more important change is that we return the root tag in the resulting
471
- JavaScript structure via the `explicitRoot` setting, so you need to access the
472
- first element. This is useful for anybody who wants to know what the root node
473
- is and preserves more information. The last major change was to enable
474
- `explicitArray`, so everytime it is possible that one might embed more than one
475
- sub-tag into a tag, xml2js >= 0.2 returns an array even if the array just
476
- includes one element. This is useful when dealing with APIs that return
477
- variable amounts of subtags.
478
-
479
- Running tests, development
480
- ==========================
481
-
482
- [![Build Status](https://travis-ci.org/Leonidas-from-XIV/node-xml2js.svg?branch=master)](https://travis-ci.org/Leonidas-from-XIV/node-xml2js)
483
- [![Coverage Status](https://coveralls.io/repos/Leonidas-from-XIV/node-xml2js/badge.svg?branch=)](https://coveralls.io/r/Leonidas-from-XIV/node-xml2js?branch=master)
484
- [![Dependency Status](https://david-dm.org/Leonidas-from-XIV/node-xml2js.svg)](https://david-dm.org/Leonidas-from-XIV/node-xml2js)
485
-
486
- The development requirements are handled by npm, you just need to install them.
487
- We also have a number of unit tests, they can be run using `npm test` directly
488
- from the project root. This runs zap to discover all the tests and execute
489
- them.
490
-
491
- If you like to contribute, keep in mind that `xml2js` is written in
492
- CoffeeScript, so don't develop on the JavaScript files that are checked into
493
- the repository for convenience reasons. Also, please write some unit test to
494
- check your behaviour and if it is some user-facing thing, add some
495
- documentation to this README, so people will know it exists. Thanks in advance!
496
-
497
- Getting support
498
- ===============
499
-
500
- Please, if you have a problem with the library, first make sure you read this
501
- README. If you read this far, thanks, you're good. Then, please make sure your
502
- problem really is with `xml2js`. It is? Okay, then I'll look at it. Send me a
503
- mail and we can talk. Please don't open issues, as I don't think that is the
504
- proper forum for support problems. Some problems might as well really be bugs
505
- in `xml2js`, if so I'll let you know to open an issue instead :)
506
-
507
- But if you know you really found a bug, feel free to open an issue instead.
@@ -1,12 +0,0 @@
1
- // Generated by CoffeeScript 1.12.7
2
- (function() {
3
- "use strict";
4
- exports.stripBOM = function(str) {
5
- if (str[0] === '\uFEFF') {
6
- return str.substring(1);
7
- } else {
8
- return str;
9
- }
10
- };
11
-
12
- }).call(this);
@@ -1,127 +0,0 @@
1
- // Generated by CoffeeScript 1.12.7
2
- (function() {
3
- "use strict";
4
- var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,
5
- hasProp = {}.hasOwnProperty;
6
-
7
- builder = require('xmlbuilder');
8
-
9
- defaults = require('./defaults').defaults;
10
-
11
- requiresCDATA = function(entry) {
12
- return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);
13
- };
14
-
15
- wrapCDATA = function(entry) {
16
- return "<![CDATA[" + (escapeCDATA(entry)) + "]]>";
17
- };
18
-
19
- escapeCDATA = function(entry) {
20
- return entry.replace(']]>', ']]]]><![CDATA[>');
21
- };
22
-
23
- exports.Builder = (function() {
24
- function Builder(opts) {
25
- var key, ref, value;
26
- this.options = {};
27
- ref = defaults["0.2"];
28
- for (key in ref) {
29
- if (!hasProp.call(ref, key)) continue;
30
- value = ref[key];
31
- this.options[key] = value;
32
- }
33
- for (key in opts) {
34
- if (!hasProp.call(opts, key)) continue;
35
- value = opts[key];
36
- this.options[key] = value;
37
- }
38
- }
39
-
40
- Builder.prototype.buildObject = function(rootObj) {
41
- var attrkey, charkey, render, rootElement, rootName;
42
- attrkey = this.options.attrkey;
43
- charkey = this.options.charkey;
44
- if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) {
45
- rootName = Object.keys(rootObj)[0];
46
- rootObj = rootObj[rootName];
47
- } else {
48
- rootName = this.options.rootName;
49
- }
50
- render = (function(_this) {
51
- return function(element, obj) {
52
- var attr, child, entry, index, key, value;
53
- if (typeof obj !== 'object') {
54
- if (_this.options.cdata && requiresCDATA(obj)) {
55
- element.raw(wrapCDATA(obj));
56
- } else {
57
- element.txt(obj);
58
- }
59
- } else if (Array.isArray(obj)) {
60
- for (index in obj) {
61
- if (!hasProp.call(obj, index)) continue;
62
- child = obj[index];
63
- for (key in child) {
64
- entry = child[key];
65
- element = render(element.ele(key), entry).up();
66
- }
67
- }
68
- } else {
69
- for (key in obj) {
70
- if (!hasProp.call(obj, key)) continue;
71
- child = obj[key];
72
- if (key === attrkey) {
73
- if (typeof child === "object") {
74
- for (attr in child) {
75
- value = child[attr];
76
- element = element.att(attr, value);
77
- }
78
- }
79
- } else if (key === charkey) {
80
- if (_this.options.cdata && requiresCDATA(child)) {
81
- element = element.raw(wrapCDATA(child));
82
- } else {
83
- element = element.txt(child);
84
- }
85
- } else if (Array.isArray(child)) {
86
- for (index in child) {
87
- if (!hasProp.call(child, index)) continue;
88
- entry = child[index];
89
- if (typeof entry === 'string') {
90
- if (_this.options.cdata && requiresCDATA(entry)) {
91
- element = element.ele(key).raw(wrapCDATA(entry)).up();
92
- } else {
93
- element = element.ele(key, entry).up();
94
- }
95
- } else {
96
- element = render(element.ele(key), entry).up();
97
- }
98
- }
99
- } else if (typeof child === "object") {
100
- element = render(element.ele(key), child).up();
101
- } else {
102
- if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) {
103
- element = element.ele(key).raw(wrapCDATA(child)).up();
104
- } else {
105
- if (child == null) {
106
- child = '';
107
- }
108
- element = element.ele(key, child.toString()).up();
109
- }
110
- }
111
- }
112
- }
113
- return element;
114
- };
115
- })(this);
116
- rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {
117
- headless: this.options.headless,
118
- allowSurrogateChars: this.options.allowSurrogateChars
119
- });
120
- return render(rootElement, rootObj).end(this.options.renderOpts);
121
- };
122
-
123
- return Builder;
124
-
125
- })();
126
-
127
- }).call(this);