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/root.m

    r723 r925  
    55% tree   - XMLTree object
    66% uid    - UID of the root element of tree
    7 %_______________________________________________________________________
     7%__________________________________________________________________________
    88%
    99% Return the uid of the root element of the tree.
    10 %_______________________________________________________________________
    11 % @(#)root.m                   Guillaume Flandin               02/04/17
     10%__________________________________________________________________________
     11% Copyright (C) 2002-2008  http://www.artefact.tk/
     12
     13% Guillaume Flandin
     14% $Id: root.m 4460 2011-09-05 14:52:16Z guillaume $
    1215
    1316% Actually root is necessarily the element whos UID is 1, by
     
    2730% Look for the first element in the XML Tree
    2831for i=1:length(tree)
    29         if strcmp(get(tree,i,'type'),'element')
    30                 uid = i;
    31                 break
    32         end
     32    if strcmp(get(tree,i,'type'),'element')
     33        uid = i;
     34        break
     35    end
    3336end
Note: See TracChangeset for help on using the changeset viewer.