source: trunk/src/@xmltree/set.m @ 951

Last change on this file since 951 was 925, checked in by sommeria, 8 years ago

xmltree updated

File size: 977 bytes
Line 
1function tree = set(tree,uid, parameter, value)
2% XMLTREE/SET Method (set object properties)
3% FORMAT tree = set(tree,uid,parameter,value)
4%
5% tree      - XMLTree object
6% uid       - array (or cell) of uid's
7% parameter - property name
8% value     - property value
9%__________________________________________________________________________
10%
11% Set object properties given its uid and pairs parameter/value
12% The tree parameter must be in input AND in output
13%__________________________________________________________________________
14% Copyright (C) 2002-2011  http://www.artefact.tk/
15
16% Guillaume Flandin
17% $Id: set.m 4460 2011-09-05 14:52:16Z guillaume $
18
19
20%error(nargchk(4,4,nargin));
21
22if iscell(uid), uid = [uid{:}]; else uid = uid(:); end
23
24for i=1:length(uid)
25    tree.tree{uid(i)} = builtin('subsasgn', tree.tree{uid(i)}, struct('type','.','subs',parameter), value);
26    %tree.tree{uid(i)} = setfield(tree.tree{uid(i)},parameter,value);
27end
Note: See TracBrowser for help on using the repository browser.