Ignore:
Timestamp:
Feb 17, 2016, 12:52:48 PM (8 years ago)
Author:
sommeria
Message:

xmltree updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/@xmltree/children.m

    r723 r925  
    66% uid    - uid of the element
    77% child  - array of the UIDs of children of node uid
    8 %_______________________________________________________________________
     8%__________________________________________________________________________
    99%
    1010% Return UID's of children of node uid
    11 %_______________________________________________________________________
    12 % @(#)children.m              Guillaume Flandin                02/04/09
     11%__________________________________________________________________________
     12% Copyright (C) 2002-2011  http://www.artefact.tk/
    1313
    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));
    1518
    1619child = [];
     
    1821l = length(tree);
    1922for i=1:length(uid)
    20         if uid(i) > 0 & uid(i) <= l
    21                 if strcmp(tree.tree{uid(i)}.type,'element')
    22                         child = [child tree.tree{uid(i)}.contents];
    23                 end
    24         else
    25                 error('[XMLTree] Invalid UID.');
    26         end
     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
    2730end
    2831if isempty(child), child = []; end
Note: See TracChangeset for help on using the changeset viewer.