diff --git a/lib/xml2js.js b/lib/xml2js.js index e953910..672df7c 100644 --- a/lib/xml2js.js +++ b/lib/xml2js.js @@ -95,7 +95,7 @@ function onInstruction(instruction) { var attributes = {}; if (instruction.body && (instruction.name.toLowerCase() === 'xml' || options.instructionHasAttributes)) { while (instruction.body) { - var attribute = instruction.body.match(/([\w:-]+)\s*=\s*"([^"]*)"|'([^']*)'|(\w+)\s*/); + var attribute = instruction.body.match(/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/); if (!attribute) { break; } diff --git a/package.json b/package.json index c7b58c7..25f6f5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xml-js", - "version": "1.3.3", + "version": "1.3.4", "description": "A convertor between XML text and Javascript object / JSON text.", "repository": { "type": "git",