谁能告诉我在哪里可以找到这里提到的“短手指南”:
https://developers.google.com/apps-script/class_xml#parseJS
function createXmlDocument() {
var elementName = 'customerName';
var customerName = 'Bad Boys Inc.';
var parseJSparameter = [elementName, customerName];
var xmlDoc = Xml.parseJS(parseJSparameter);
var textOfXml = xmlDoc.toXmlString();
Logger.log(textOfXml);
}
function createXmlDocument2() {
var shortHand = ['customer',
{'active' : 'true'},
['name', 'Bad Boys Inc.'],
['customerId', '6060']
];
var xmlDoc = Xml.parseJS(shortHand);
var textOfXml = shortHand.toXmlString();
Logger.log(textOfXml);
}
createXmlDocument 有效,但 createXmlDocument2 无效。