Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Create XML
From NetSuite help :
var bookShelf = xml.Parser.fromString(file.load('SuiteScripts/books.xml').getContents());
var newBookNode = xmlData.createElement("book");
var newTitleNode = xmlData.createElement("title");
var newTitleNodeValue = xmlData.createTextNode("");
var newAuthorNode = xmlData.createElement("author");
var newAuthorNodeValue = xmlData.createTextNode("");
newTitleNode.appendChild(newTitleNodeValue);
newAuthorNode.appendChild(newAuthorNodeValue);
newBookNode.appendChild(newTitleNode);
newBookNode.appendChild(newAuthorNode);
var newbook = bookShelf.appendChild({ newChild : newBookNode });
But xmlData is missing! How to create XML document, append child node from empty XML ???