Open theasteve opened 5 years ago
Currently the xml2js passthrough options are just passed to the xml2js
constructor, not to parseString
.
I'm happy to accept a PR that adds another option that can be passed to parseString
to do things like stripPrefix
.
I'm a bit confused by the documentation and am willing to create a PR to improve it once I have a better understanding of the following. In
https://github.com/bobby-brennan/rss-parser#xml2js-passthrough
states that you can pass options to xml2js parser. I have the following:I would like to make use of
stripPrefix
of the xml2js library. It still a bit confusing to me how to usexml2js
from the documentation. Thisnew xml2js.Parser()
as shown in the docs won't work. What I am tryin to accomplish is to get the namespace fields.from
event
a more descriptive image would be shown below:However, when I try to
console.log
each item from the following function:I dont get the namespace fields from event. I would like to get those fields in the JSON without having to add
customFields
. How can I make use ofstripPrefix
option an usexml2js
?