touv/node-xml-mapping — pull request #7 by ntgn81 (2013-07-09 05:22:11+00:00)
Title: Adding an option to load method for specifying array nodes

### Issue

Currently, load() method creates array object for a node only if there are more than 1 sibling nodes with the same tag name.

In the sample below, the data structure for both and are supposed to be the same - arrays. And we know that beforehand, just there is no way for us to tell load() method that we want items1.item and items2.item to always be array, no matter of the
tag count.

Input:
```xml

1

1

2

```
Output#1
```javascript
{
"items1": {
"item": {
"$t": "1"
}
},
"items2": {
"item": [
{
"$t": "1"
},
{
"$t": "2"
}
]
}
}
```

### Solution

In this PR, I added a new option in options object - "arrays". For the same xml input above, and with the options below:

```javascript
var xml = xmlSpecifiedAbove;
var options = {
arrays: [
'/items1/item',
'/items2/item'
]
};
xm.load(xml, options);
```
Will return expected json:

```javascript
{
"items1": {
"item": [{
"$t": "1"
}]
},
"items2": {
"item": [{
"$t": "1"
}, {
"$t": "2"
}]
}
}
```