Changeset 919 for trunk/src/struct2xml.m
- Timestamp:
- Jun 26, 2015, 5:14:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/struct2xml.m
r908 r919 1 %'struct2xml': transform a matlab structure to a xml tree.1 %'struct2xml': transforms a matlab structure to a xml tree. 2 2 %-------------------------------------------------------------- 3 % 3 4 % each field with char string or num vector is transformed into a corresponding xml element 4 5 % each field with a matrix containing n lines is transformed into a xml element repeated n times 5 % WARNING: PROBLEM WITH HIERARCHICAL structures 6 % each substructure of the input matlab structure is translateed into a subtree in the xml object 7 % it is also possible to append a subtree to an existing xml object t 8 % 9 % t=struct2xml(Object,t,root_uid) 6 10 %%%%%%%%%%%%%%%%%%%%%%% 7 11 % OUTPUT: 8 12 % t: xmltree reproducing the structure of Object 9 13 % type 'save(t)' to visualize the xml text and save(filename,t) to save it in a file 14 % to set the title tag of the file, type t=set(t,1,'name','titletag') 10 15 % 11 16 % INPUT: 12 17 % Object: matlab structure, possibly hierarchical 13 % t: optional input xml tree in which a new branchneeds to be appended18 % t: optional input xml tree in which a subtree needs to be appended 14 19 % root_uid: optional uid of the xml element under which the new subtree must be appended 15 20
Note: See TracChangeset
for help on using the changeset viewer.