GetXML data to infotable
Hi everyone, I am trying to get the hang of getting xml data from a sample website and translate into an infotable. However, I am still getting an infotable without any data.
Here is my code.
var params = {
proxyScheme: undefined /* STRING */,
headers: undefined /* JSON */,
ignoreSSLErrors: true /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
withCookies: undefined /* BOOLEAN */,
url: "https://www.w3schools.com/xml/simple.xml" /* STRING */,
timeout: undefined /* NUMBER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: XML
var result = Resources["ContentLoaderFunctions"].LoadXML(params);
var params1 = {
infoTableName : "InfoTable",
dataShapeName : "Food"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(PLANT)
var FoodTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params1);
var newEntry = new Object();
for each (var tag in result.breakfast_menu.food){
newEntry.food = tag;
resultTable.AddRow(newEntry);
}
var result = FoodTable;
Thank you!

