Mercurial > hg > ltpda
comparison m-toolbox/classes/@ltpda_uo/attachToDom.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 | |
2 function collectedHist = attachToDom(obj, dom, parent, collectedHist) | |
3 | |
4 collectedHist = attachToDom@ltpda_obj(obj, dom, parent, collectedHist); | |
5 | |
6 % Add name | |
7 if ~isempty(obj.name) | |
8 nameNode = dom.createElement('name'); | |
9 utils.xml.attachCharToDom(obj.name, dom, nameNode); | |
10 parent.appendChild(nameNode); | |
11 end | |
12 | |
13 % Add description | |
14 if ~isempty(obj.description) | |
15 descNode = dom.createElement('description'); | |
16 utils.xml.attachCharToDom(obj.description, dom, descNode); | |
17 parent.appendChild(descNode); | |
18 end | |
19 | |
20 % Add mdlfile | |
21 if ~isempty(obj.mdlfile) | |
22 % needs string fix as well | |
23 mdlfileNode = dom.createElement('mdlfile'); | |
24 utils.xml.attachCharToDom(obj.mdlfile, dom, mdlfileNode); | |
25 parent.appendChild(mdlfileNode); | |
26 end | |
27 | |
28 % Add UUID | |
29 parent.setAttribute('UUID', obj.UUID); | |
30 | |
31 end |