% xmloutput_tags 

% Create a sample XML document.
docNode = com.mathworks.xml.XMLUtils.createDocument... 
    ('tags')
docRootNode = docNode.getDocumentElement;
for i=1:length(annots_descripts)
    thisElement = docNode.createElement('tagname'); 
    thisElement.appendChild... 
        (docNode.createTextNode(annots_descripts{i}(1:end)));
    docRootNode.appendChild(thisElement);
end
%docNode.appendChild(docNode.createComment('this is a comment'));

% Save the sample XML document.
xmlFileName = ['test','.xml'];
xmlwrite(xmlFileName,docRootNode);
edit(xmlFileName);