michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, you can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: var EXPORTED_SYMBOLS = ['getAttributes']; michael@0: michael@0: michael@0: var getAttributes = function (node) { michael@0: var attributes = {}; michael@0: michael@0: for (var i in node.attributes) { michael@0: if (!isNaN(i)) { michael@0: try { michael@0: var attr = node.attributes[i]; michael@0: attributes[attr.name] = attr.value; michael@0: } michael@0: catch (e) { michael@0: } michael@0: } michael@0: } michael@0: michael@0: return attributes; michael@0: } michael@0: