comparison m-toolbox/classes/@ltpda_uo/fromDom.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 fromDom(obj, node, inhists)
3
4 %%%%%%%%%% Call super-class
5
6 fromDom@ltpda_obj(obj, node, inhists);
7
8 %%%%%%%%%% Get properties from the node attributes
9
10 % Get UUID
11 obj.UUID = utils.xml.mchar(node.getAttribute('UUID'));
12
13 %%%%%%%%%% Get properties from the child nodes
14
15 % Get name
16 childNode = utils.xml.getChildByName(node, 'name');
17 if ~isempty(childNode)
18 obj.name = utils.xml.getString(childNode);
19 end
20
21 % Get description
22 childNode = utils.xml.getChildByName(node, 'description');
23 if ~isempty(childNode)
24 obj.description = utils.xml.getString(childNode);
25 end
26
27 % Get mdlfile
28 childNode = utils.xml.getChildByName(node, 'mdlfile');
29 if ~isempty(childNode)
30 obj.mdlfile = utils.xml.getString(childNode);
31 end
32
33 end