Microscopy Image Browser 2.91
MIB
Loading...
Searching...
No Matches
struct2xml.m File Reference

Convert a MATLAB structure into a xml file [ ] = struct2xml( s, file ) xml = struct2xml( s ) More...

Functions

function varargoutstruct2xml (s, varargin)
 Convert a MATLAB structure into a xml file [ ] = struct2xml( s, file ) xml = struct2xml( s )
 
function  struct2xml>parseStruct (s, docNode, curNode, pName)
 
function [ str , succes ] = struct2xml>val2str (val)
 

Detailed Description

Convert a MATLAB structure into a xml file [ ] = struct2xml( s, file ) xml = struct2xml( s )

Function Documentation

◆ struct2xml>parseStruct()

function struct2xml>parseStruct ( s,
docNode,
curNode,
pName )

◆ struct2xml>val2str()

function [ str , succes ] = struct2xml>val2str ( val)

◆ struct2xml()

function varargout = struct2xml ( s,
varargin )

Convert a MATLAB structure into a xml file [ ] = struct2xml( s, file ) xml = struct2xml( s )

A structure containing
s.XMLname.AttributesText.attrib1 = "Some value"; s.XMLname.Element.Text = "Some text"; s.XMLname.DifferentElement{1}.AttributesText.attrib2 = "2"; s.XMLname.DifferentElement{1}.Text = "Some more text"; s.XMLname.DifferentElement{2}.AttributesText.attrib3 = "2"; s.XMLname.DifferentElement{2}.AttributesText.attrib4 = "1"; s.XMLname.DifferentElement{2}.Text = "Even more text";
Will produce
<XMLname attrib1="Some value"> <Element>Some text</Element> <DifferentElement attrib2="2">Some more text</Element> <DifferentElement attrib3="2" attrib4="1">Even more text</DifferentElement> </XMLname>

Please note that the following strings are substituted dash by -, colon by : and dot by .

Written by W. Falkena, ASTI, TUDelft, 27-08-2010 On-screen output functionality added by P. Orth, 01-12-2010 Multiple space to single space conversion adapted for speed by T. Lohuis, 11-04-2011 Val2str subfunction bugfix by H. Gsenger, 19-9-2011

Referenced by saveXMLheader().

Here is the caller graph for this function: