Mercurial > hg > camir-aes2014
annotate core/magnatagatune/xml_write_tags.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
rev | line source |
---|---|
wolffd@0 | 1 % xmloutput_tags |
wolffd@0 | 2 |
wolffd@0 | 3 % Create a sample XML document. |
wolffd@0 | 4 docNode = com.mathworks.xml.XMLUtils.createDocument... |
wolffd@0 | 5 ('tags') |
wolffd@0 | 6 docRootNode = docNode.getDocumentElement; |
wolffd@0 | 7 for i=1:length(annots_descripts) |
wolffd@0 | 8 thisElement = docNode.createElement('tagname'); |
wolffd@0 | 9 thisElement.appendChild... |
wolffd@0 | 10 (docNode.createTextNode(annots_descripts{i}(1:end))); |
wolffd@0 | 11 docRootNode.appendChild(thisElement); |
wolffd@0 | 12 end |
wolffd@0 | 13 %docNode.appendChild(docNode.createComment('this is a comment')); |
wolffd@0 | 14 |
wolffd@0 | 15 % Save the sample XML document. |
wolffd@0 | 16 xmlFileName = ['test','.xml']; |
wolffd@0 | 17 xmlwrite(xmlFileName,docRootNode); |
wolffd@0 | 18 edit(xmlFileName); |