var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName(‘Sheet1’);
function getLinks(){
var xml = UrlFetchApp.fetch(‘https://www.*********.com/job_listing-sitemap.xml’).getContentText();
var xmlObj = XmlService.parse(xml);
var root = xmlObj.getRootElement();
var ns = XmlService.getNamespace(‘http://www.sitemaps.org/schemas/sitemap/0.9’);
var links = root.getChildren();
var linksArr = [];
for(var i = 0; i < links.length; i++){
linksArr.push([links[i].getChildren()[0].getText()]);
}
sheet.getRange(2, 1, linksArr.length, 1).setValues(linksArr);
}