diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/magnatagatune/xml_write_tags.m	Tue Feb 10 15:05:51 2015 +0000
@@ -0,0 +1,18 @@
+% 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);
\ No newline at end of file