From b0b5d42af0717fb4b05f2a78f7e2e0d38f837e1a Mon Sep 17 00:00:00 2001 From: Francesco Favatella <34793940+francescofavatella@users.noreply.github.com> Date: Sat, 4 Apr 2020 12:19:35 +0100 Subject: [PATCH] Fix `Promise usage` Example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5592feaa..0ee8b105 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ var xml = ''; // With parser var parser = new xml2js.Parser(/* options */); -parser.parseStringPromise(data).then(function (result) { +parser.parseStringPromise(xml).then(function (result) { console.dir(result); console.log('Done'); }) @@ -122,7 +122,7 @@ parser.parseStringPromise(data).then(function (result) { }); // Without parser -xml2js.parseStringPromise(data /*, options */).then(function (result) { +xml2js.parseStringPromise(xml /*, options */).then(function (result) { console.dir(result); console.log('Done'); })