added support for custom elements and namespaces

resolves #31 
Can you change this to:

```js
Object.keys(data.custom_namespaces).forEach(function(name) {
    _attr['xmlns:' + name] = data.custom_namespaces[name];
});
```

It's a little more functional-style and there won't be a `name` variable left behind.