Mercurial > hg > ltpda
comparison m-toolbox/classes/@data2D/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 obj = fromDom(obj, node, inhists) | |
3 | |
4 %%%%%%%%%% Call super-class | |
5 | |
6 fromDom@ltpda_data(obj, node, inhists); | |
7 | |
8 %%%%%%%%%% Get properties from the node attributes | |
9 | |
10 %%%%%%%%%% Get properties from the child nodes | |
11 | |
12 % Get xunits | |
13 childNode = utils.xml.getChildByName(node, 'xunits'); | |
14 if ~isempty(childNode) | |
15 obj.xunits = unit(childNode, inhists); | |
16 end | |
17 | |
18 % Get x | |
19 childNode = utils.xml.getChildByName(node, 'x'); | |
20 if ~isempty(childNode) | |
21 obj.x = utils.xml.getNumber(childNode); | |
22 end | |
23 | |
24 % Get dx | |
25 childNode = utils.xml.getChildByName(node, 'dx'); | |
26 if ~isempty(childNode) | |
27 obj.dx = utils.xml.getNumber(childNode); | |
28 end | |
29 | |
30 end |