Microscopy Image Browser  1.233
All Classes Files Functions Variables Pages
struct2xml.m File Reference

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

Functions

function
varargout = 
struct2xml (s, varargin)
 Convert a MATLAB structure into a xml file [ ] = struct2xml( s, file ) xml = struct2xml( s ) More...
 
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

function struct2xml>parseStruct (   s,
  docNode,
  curNode,
  pName 
)
function [str , succes ] = struct2xml>val2str (   val)
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: