Open Abhishek2kr opened 5 years ago
Are you using the most recent version of xml2js?
Yarn
yarn upgrade xml2js
NPM
npm update xml2js
Please confirm when possible....thanks!
Are you using the most recent version of xml2js?
Only the builder has this option but not the parser
@Abhishek2kr - you gave my answer a thumbs up, did that work for you? Please let us know when you can...
If all good, please close issue...
Thanks!
My npm version is 6.4.1 I have not updated the npm. And the xml2js version is 0.4.4
npm update xml2js
- should just update xml2js, not npm itself...
https://stackoverflow.com/questions/43127863/node-update-a-specific-package
I have just updated the xml2js still not working. I think we should create option for parser, similar to cdata option used in builder.
I was running into this as well, I was looking to make a PR for this but don't have time yet... If you include this in the parser options, it will remove it, note the indexOf is really there for performance reasons since most xml feeds don't use cdata on all attributes.
valueProcessors: [
(value) => {
if (value.indexOf('<![CDATA[') !== -1) {
return value.replace(/\<\!\[CDATA\[([\s|\S]*)\]\]\>/i, "$1");
}
return value;
},
]
it's handled in the last versions, all need to do is to update the package
So there should be option so that we can pass for parsing the multiple <![CDATA[