Ask coding questions

← Back to all posts
Rss
h
McJoe21 (2)

Hello im trying to get the items of this xml file using nodejs but it won't work , im new to feeds and stuff. Can someone help?

Url to get items: https://rss.app/feeds/uiWs5JE3i7NS1Gll.xml

Comments
hotnewtop
Coder100 (18873)

the reason is because there is an error, which you did not catch, here is the error:

McJoe21 (2)

@Coder100 how do i catch err on a function with the error arg in it? Is there a more simple way of doing the script?

Coder100 (18873)

you don't.
Either the err has a value (meaning result is undefined) -- and you have to do something about the err
or result is defined and everything works fine.

@McJoe21

McJoe21 (2)

@Coder100 how do i stop err from happening- problems with code , first time with xml 2 js

Coder100 (18873)

the xml you are trying to parse is invalid @McJoe21