functions = {'demFlow','facetFlow','flowMatrix','pixelFlow'};
for idx = 1:numel(functions)
curr_node = docNode.createElement('tocitem');
curr_file = [functions{idx} '_help.html'];
curr_node.setAttribute('target',curr_file);
% Child text is the function name.
curr_node.appendChild(docNode.createTextNode(functions{idx}));
product.appendChild(curr_node);
end
最后,将该 DOM 节点导出到名为 infoUAT.xml 的 XML 文件中,并使用 type 函数查看该文件。