Skip to content

AlwaysArray and Multiple Comments & CData in Compact Mode

Compare
Choose a tag to compare
@nashwaan nashwaan released this 27 Apr 08:24
· 97 commits to master since this release

Setting {compact: true, alwaysArray: true} when converting from xml to js/json will always put sub-element (even if it is only one) into an array of objects. This can simplify the client code a little so that it can always expect the content of an element is an array rather than checking everytime whether it is an array or object.

Also, multiple comments and multiple CDatas are now supported in compact mode.