view m-toolbox/classes/@ltpda_uo/fromDom.m @ 35:4be5f7a5316f
database-connection-manager
Suppress output messages on preferences loading and saving
author
Daniele Nicolodi <nicolodi@science.unitn.it>
date
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05)
parents
f0afece42f48
children
line source
+ −
+ − function fromDom(obj, node, inhists)
+ −
+ − %%%%%%%%%% Call super-class
+ −
+ − fromDom@ltpda_obj(obj, node, inhists);
+ −
+ − %%%%%%%%%% Get properties from the node attributes
+ −
+ − % Get UUID
+ − obj.UUID = utils.xml.mchar(node.getAttribute('UUID'));
+ −
+ − %%%%%%%%%% Get properties from the child nodes
+ −
+ − % Get name
+ − childNode = utils.xml.getChildByName(node, 'name');
+ − if ~isempty(childNode)
+ − obj.name = utils.xml.getString(childNode);
+ − end
+ −
+ − % Get description
+ − childNode = utils.xml.getChildByName(node, 'description');
+ − if ~isempty(childNode)
+ − obj.description = utils.xml.getString(childNode);
+ − end
+ −
+ − % Get mdlfile
+ − childNode = utils.xml.getChildByName(node, 'mdlfile');
+ − if ~isempty(childNode)
+ − obj.mdlfile = utils.xml.getString(childNode);
+ − end
+ −
+ − end