XML from/to JavaScript object