Javascript prase XML
Hi, I need to read a big XML file and parse it. The problem is that the javascript activity is generating the error `out of memory`.
This code generates the error:
var fileContent = loadFile("FILEPATH", "UTF-8");
fileContent = fileContent.substring(fileContent.indexOf("\n") + 1); // Remove first line: <?xml version="1.0" encoding="UTF-8"?>
xmlContent = new XML(fileContent);
for each(var element in xmlContent.elements) {
logInfo(element.name);
}
Is there a better way to prase an XML file?