Google Apps Script - Xml API has been suspended

Asked

Viewed 45 times

2

I have a Google Apps Script but I started receiving the following error:

The Xml API has been suspended. The API has been marked as failed, which means the resource should be avoided and can be removed later. Consider using another solution.

Below excerpt from the code:

var xmldocument = Xml.parse(xmlContent, true);
var items = xmldocument.rss.channel.getElements("item");

for (var index = 0; index < items.length; index++) {        
    var jiraKey  = items[index].getElement("key").getText();

I changed the parse to use the var xmldocument = XmlService.parse(xmlContent); but I started getting the following error:

Typeerror: Cannot read Property "Channel" from Undefined. (line 185, file "Jira Validation"

Does anyone know the best solution to this problem?

Thank you.

  • 1

    The best solution is to stop using XML, according to the warning, and switch to the most modern and practical format they suggest. Not that you can’t arrange the property problem, which shouldn’t have to do with the top warning, but you could already fix it at once.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.