00001 # Change Log
00002
00003 All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http:
00004
00005 ## [8.2.2] - 2016-04-08
00006 - Falsy values can now be used as a text node in callback mode.
00007
00008 ## [8.2.1] - 2016-04-07
00009 - Falsy values can now be used as a text node. See
00010 [#117](https:
00011
00012 ## [8.2.0] - 2016-04-01
00013 - Removed lodash dependency to keep the library small and simple. See
00014 [#114](https:
00015 [#53](https:
00016 and [#43](https:
00017 - Added title case to name conversion options.
00018
00019 ## [8.1.0] - 2016-03-29
00020 - Added the callback option to the `begin` export function. When used with a
00021 callback function, the XML document will be generated in chunks and each chunk
00022 will be passed to the supplied function. In this mode, `begin` uses a different
00023 code path and the builder should use much less memory since the entire XML tree
00024 is not kept. There are a few drawbacks though. For example, traversing the document
00025 tree or adding attributes to a node after it is written is not possible. It is
00026 also not possible to remove nodes or attributes.
00027
00028 ``` js
00029 var result = '';
00030
00031 builder.begin(function(chunk) { result += chunk; })
00032 .dec()
00033 .ele('root')
00034 .ele('xmlbuilder').up()
00035 .end();
00036 ```
00037
00038 - Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https:
00039
00040 ## [8.0.0] - 2016-03-25
00041 - Added the `begin` export function. See the wiki for details.
00042 - Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose.
00043 - Dropped support for old node.js releases. Minimum required node.js version is now 4.0.
00044
00045 ## [7.0.0] - 2016-03-21
00046 - Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element.
00047 ```js
00048 root.ele('node').ins('pi');
00049
00050 <?pi?><node/>
00051
00052 <node><?pi?></node>
00053 ```
00054
00055 ## [6.0.0] - 2016-03-20
00056 - Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document.
00057
00058 ## [5.0.1] - 2016-03-08
00059 - Moved require statements for text case conversion to the top of files to reduce lazy requires.
00060
00061 ## [5.0.0] - 2016-03-05
00062 - Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`.
00063 - Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http:
00064 - Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed.
00065 - Added support for [nested CDATA](https:
00066
00067 ## [4.2.1] - 2016-01-15
00068 - Updated lodash dependency to 4.0.0.
00069
00070 ## [4.2.0] - 2015-12-16
00071 - Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded.
00072
00073 ## [4.1.0] - 2015-11-11
00074 - Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g.
00075
00076 ```js
00077 root.ele({ number: [ "one", "two" ]});
00078
00079 <number>
00080 <one/>
00081 <two/>
00082 </number>
00083
00084 <number>one</number>
00085 <number>two</number>
00086 ```
00087
00088 ## [4.0.0] - 2015-11-01
00089 - Removed the `#list` decorator. Array items are now created as child nodes by default.
00090 - Fixed a bug where the XML encoding string was checked partially.
00091
00092 ## [3.1.0] - 2015-09-19
00093 - `#list` decorator ignores empty arrays.
00094
00095 ## [3.0.0] - 2015-09-10
00096 - Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https:
00097
00098 ## [2.6.5] - 2015-09-09
00099 - Use native `isArray` instead of lodash.
00100 - Indentation of processing instructions are set to the parent element's.
00101
00102 ## [2.6.4] - 2015-05-27
00103 - Updated lodash dependency to 3.5.0.
00104
00105 ## [2.6.3] - 2015-05-27
00106 - Bumped version because previous release was not published on npm.
00107
00108 ## [2.6.2] - 2015-03-10
00109 - Updated lodash dependency to 3.5.0.
00110
00111 ## [2.6.1] - 2015-02-20
00112 - Updated lodash dependency to 3.3.0.
00113
00114 ## [2.6.0] - 2015-02-20
00115 - Fixed a bug where the `XMLNode` constructor overwrote the super class parent.
00116 - Removed document property from cloned nodes.
00117 - Switched to mocha.js for testing.
00118
00119 ## [2.5.2] - 2015-02-16
00120 - Updated lodash dependency to 3.2.0.
00121
00122 ## [2.5.1] - 2015-02-09
00123 - Updated lodash dependency to 3.1.0.
00124 - Support all node >= 0.8.
00125
00126 ## [2.5.0] - 2015-00-03
00127 - Updated lodash dependency to 3.0.0.
00128
00129 ## [2.4.6] - 2015-01-26
00130 - Show more information from attribute creation with null values.
00131 - Added iojs as an engine.
00132 - Self close elements with empty text.
00133
00134 ## [2.4.5] - 2014-11-15
00135 - Fixed prepublish script to run on windows.
00136 - Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value.
00137 - Moved require statements to the top of files to reduce lazy requires. See [#62](https:
00138
00139 ## [2.4.4] - 2014-09-08
00140 - Added the `offset` option to `toString()` for use in XML fragments.
00141
00142 ## [2.4.3] - 2014-08-13
00143 - Corrected license in package description.
00144
00145 ## [2.4.2] - 2014-08-13
00146 - Dropped performance test and memwatch dependency.
00147
00148 ## [2.4.1] - 2014-08-12
00149 - Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https:
00150
00151 ## [2.4.0] - 2014-08-04
00152 - Correct cases of pubID and sysID.
00153 - Use single lodash instead of separate npm modules. See [#53](https:
00154 - Escape according to Canonical XML 1.0. See [#54](https:
00155
00156 ## [2.3.0] - 2014-07-17
00157 - Convert objects to JS primitives while sanitizing user input.
00158 - Object builder preserves items with null values. See [#44](https:
00159 - Use modularized lodash functions to cut down dependencies.
00160 - Process empty objects when converting from objects so that we don't throw on empty child objects.
00161
00162 ## [2.2.1] - 2014-04-04
00163 - Bumped version because previous release was not published on npm.
00164
00165 ## [2.2.0] - 2014-04-04
00166 - Switch to lodash from underscore.
00167 - Removed legacy `ext` option from `create()`.
00168 - Drop old node versions: 0.4, 0.5, 0.6. 0.8 is the minimum requirement from now on.
00169
00170 ## [2.1.0] - 2013-12-30
00171 - Removed duplicate null checks from constructors.
00172 - Fixed node count in performance test.
00173 - Added option for skipping null attribute values. See [#26](https:
00174 - Allow multiple values in `att()` and `ins()`.
00175 - Added ability to run individual performance tests.
00176 - Added flag for ignoring decorator strings.
00177
00178 ## [2.0.1] - 2013-12-24
00179 - Removed performance tests from npm package.
00180
00181 ## [2.0.0] - 2013-12-24
00182 - Combined loops for speed up.
00183 - Added support for the DTD and XML declaration.
00184 - `clone` includes attributes.
00185 - Added performance tests.
00186 - Evaluate attribute value if function.
00187 - Evaluate instruction value if function.
00188
00189 ## [1.1.2] - 2013-12-11
00190 - Changed processing instruction decorator to `?`.
00191
00192 ## [1.1.1] - 2013-12-11
00193 - Added processing instructions to JS object conversion.
00194
00195 ## [1.1.0] - 2013-12-10
00196 - Added license to package.
00197 - `create()` and `element()` accept JS object to fully build the document.
00198 - Added `nod()` and `n()` aliases for `node()`.
00199 - Renamed `convertAttChar` decorator to `convertAttKey`.
00200 - Ignore empty decorator strings when converting JS objects.
00201
00202 ## [1.0.2] - 2013-11-27
00203 - Removed temp file which was accidentally included in the package.
00204
00205 ## [1.0.1] - 2013-11-27
00206 - Custom stringify functions affect current instance only.
00207
00208 ## [1.0.0] - 2013-11-27
00209 - Added processing instructions.
00210 - Added stringify functions to sanitize and convert input values.
00211 - Added option for headless XML documents.
00212 - Added vows tests.
00213 - Removed Makefile. Using npm publish scripts instead.
00214 - Removed the `begin()` function. `create()` begins the document by creating the root node.
00215
00216 ## [0.4.3] - 2013-11-08
00217 - Added option to include surrogate pairs in XML content. See [#29](https:
00218 - Fixed empty value string representation in pretty mode.
00219 - Added pre and postpublish scripts to package.json.
00220 - Filtered out prototype properties when appending attributes. See [#31](https:
00221
00222 ## [0.4.2] - 2012-09-14
00223 - Removed README.md from `.npmignore`.
00224
00225 ## [0.4.1] - 2012-08-31
00226 - Removed `begin()` calls in favor of `XMLBuilder` constructor.
00227 - Added the `end()` function. `end()` is a convenience over `doc().toString()`.
00228
00229 ## [0.4.0] - 2012-08-31
00230 - Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line.
00231 - Soft deprecated `begin()`.
00232
00233 ## [0.3.11] - 2012-08-13
00234 - Package keywords are fixed to be an array of values.
00235
00236 ## [0.3.10] - 2012-08-13
00237 - Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases.
00238
00239 ## [0.3.3] - 2012-07-27
00240 - Implemented `importXMLBuilder()`.
00241
00242 ## [0.3.2] - 2012-07-20
00243 - Fixed a duplicated escaping problem on `element()`.
00244 - Fixed a problem with text node creation from empty string.
00245 - Calling `root()` on the document element returns the root element.
00246 - `XMLBuilder` no longer extends `XMLFragment`.
00247
00248 ## [0.3.1] - 2011-11-28
00249 - Added guards for document element so that nodes cannot be inserted at document level.
00250
00251 ## [0.3.0] - 2011-11-28
00252 - Added `doc()` to return the document element.
00253
00254 ## [0.2.2] - 2011-11-28
00255 - Prevent code relying on `up()`'s older behavior to break.
00256
00257 ## [0.2.1] - 2011-11-28
00258 - Added the `root()` function.
00259
00260 ## [0.2.0] - 2011-11-21
00261 - Added Travis-CI integration.
00262 - Added coffee-script dependency.
00263 - Added insert, traversal and delete functions.
00264
00265 ## [0.1.7] - 2011-10-25
00266 - No changes. Accidental release.
00267
00268 ## [0.1.6] - 2011-10-25
00269 - Corrected `package.json` bugs link to `url` from `web`.
00270
00271 ## [0.1.5] - 2011-08-08
00272 - Added missing npm package contents.
00273
00274 ## [0.1.4] - 2011-07-29
00275 - Text-only nodes are no longer indented.
00276 - Added documentation for multiple instances.
00277
00278 ## [0.1.3] - 2011-07-27
00279 - Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed.
00280 - Fixed `u()` function so that it now correctly calls `up()`.
00281 - Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably.
00282
00283 ## [0.1.2] - 2011-06-03
00284 - `ele()` accepts element text.
00285 - `attributes()` now overrides existing attributes if passed the same attribute name.
00286
00287 ## [0.1.1] - 2011-05-19
00288 - Added the raw output option.
00289 - Removed most validity checks.
00290
00291 ## [0.1.0] - 2011-04-27
00292 - `text()` and `cdata()` now return parent element.
00293 - Attribute values are escaped.
00294
00295 ## [0.0.7] - 2011-04-23
00296 - Coerced text values to string.
00297
00298 ## [0.0.6] - 2011-02-23
00299 - Added support for XML comments.
00300 - Text nodes are checked against CharData.
00301
00302 ## [0.0.5] - 2010-12-31
00303 - Corrected the name of the main npm module in `package.json`.
00304
00305 ## [0.0.4] - 2010-12-28
00306 - Added `.npmignore`.
00307
00308 ## [0.0.3] - 2010-12-27
00309 - root element is now constructed in `begin()`.
00310 - moved prolog to `begin()`.
00311 - Added the ability to have CDATA in element text.
00312 - Removed unused prolog aliases.
00313 - Removed `builder()` function from main module.
00314 - Added the name of the main npm module in `package.json`.
00315
00316 ## [0.0.2] - 2010-11-03
00317 - `element()` expands nested arrays.
00318 - Added pretty printing.
00319 - Added the `up()`, `build()` and `prolog()` functions.
00320 - Added readme.
00321
00322 ## 0.0.1 - 2010-11-02
00323 - Initial release
00324
00325 [8.2.2]: https:
00326 [8.2.1]: https:
00327 [8.2.0]: https:
00328 [8.1.0]: https:
00329 [8.0.0]: https:
00330 [7.0.0]: https:
00331 [6.0.0]: https:
00332 [5.0.1]: https:
00333 [5.0.0]: https:
00334 [4.2.1]: https:
00335 [4.2.0]: https:
00336 [4.1.0]: https:
00337 [4.0.0]: https:
00338 [3.1.0]: https:
00339 [3.0.0]: https:
00340 [2.6.5]: https:
00341 [2.6.4]: https:
00342 [2.6.3]: https:
00343 [2.6.2]: https:
00344 [2.6.1]: https:
00345 [2.6.0]: https:
00346 [2.5.2]: https:
00347 [2.5.1]: https:
00348 [2.5.0]: https:
00349 [2.4.6]: https:
00350 [2.4.5]: https:
00351 [2.4.4]: https:
00352 [2.4.3]: https:
00353 [2.4.2]: https:
00354 [2.4.1]: https:
00355 [2.4.0]: https:
00356 [2.3.0]: https:
00357 [2.2.1]: https:
00358 [2.2.0]: https:
00359 [2.1.0]: https:
00360 [2.0.1]: https:
00361 [2.0.0]: https:
00362 [1.1.2]: https:
00363 [1.1.1]: https:
00364 [1.1.0]: https:
00365 [1.0.2]: https:
00366 [1.0.1]: https:
00367 [1.0.0]: https:
00368 [0.4.3]: https:
00369 [0.4.2]: https:
00370 [0.4.1]: https:
00371 [0.4.0]: https:
00372 [0.3.11]: https:
00373 [0.3.10]: https:
00374 [0.3.3]: https:
00375 [0.3.2]: https:
00376 [0.3.1]: https:
00377 [0.3.0]: https:
00378 [0.2.2]: https:
00379 [0.2.1]: https:
00380 [0.2.0]: https:
00381 [0.1.7]: https:
00382 [0.1.6]: https:
00383 [0.1.5]: https:
00384 [0.1.4]: https:
00385 [0.1.3]: https:
00386 [0.1.2]: https:
00387 [0.1.1]: https:
00388 [0.1.0]: https:
00389 [0.0.7]: https:
00390 [0.0.6]: https:
00391 [0.0.5]: https:
00392 [0.0.4]: https:
00393 [0.0.3]: https:
00394 [0.0.2]: https:
00395