Changeset 925 for trunk/src/@xmltree/children.m
- Timestamp:
- Feb 17, 2016, 12:52:48 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/@xmltree/children.m
r723 r925 6 6 % uid - uid of the element 7 7 % child - array of the UIDs of children of node uid 8 %_______________________________________________________________________ 8 %__________________________________________________________________________ 9 9 % 10 10 % Return UID's of children of node uid 11 %_______________________________________________________________________ 12 % @(#)children.m Guillaume Flandin 02/04/0911 %__________________________________________________________________________ 12 % Copyright (C) 2002-2011 http://www.artefact.tk/ 13 13 14 error(nargchk(2,2,nargin)); 14 % Guillaume Flandin 15 % $Id: children.m 4460 2011-09-05 14:52:16Z guillaume $ 16 17 %error(nargchk(2,2,nargin)); 15 18 16 19 child = []; … … 18 21 l = length(tree); 19 22 for i=1:length(uid) 20 if uid(i) > 0& uid(i) <= l21 22 23 24 25 26 23 if uid(i) > 0 && uid(i) <= l 24 if strcmp(tree.tree{uid(i)}.type,'element') 25 child = [child tree.tree{uid(i)}.contents]; 26 end 27 else 28 error('[XMLTree] Invalid UID.'); 29 end 27 30 end 28 31 if isempty(child), child = []; end
Note: See TracChangeset
for help on using the changeset viewer.