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

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

Functions

function s = xml2struct (file)
 Convert xml file into a MATLAB structure [ s ] = xml2struct( file ) More...
 
function [
children , ptext ,

textflag ] = 
xml2struct>parseChildNodes (theNode)
 
function [ text ,
name ,
attr ,
childs ,

textflag ] = 
xml2struct>getNodeData (theNode)
 
function
attributes = 
xml2struct>parseAttributes (theNode)
 

Detailed Description

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

Function Documentation

function [text , name , attr , childs , textflag ] = xml2struct>getNodeData (   theNode)
function attributes = xml2struct>parseAttributes (   theNode)
function [children , ptext , textflag ] = xml2struct>parseChildNodes (   theNode)
function s = xml2struct (   file)

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

A file containing
<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>
Will produce
s.XMLname.Attributes.attrib1 = "Some value"; s.XMLname.Element.Text = "Some text"; s.XMLname.DifferentElement{1}.Attributes.attrib2 = "2"; s.XMLname.DifferentElement{1}.Text = "Some more text"; s.XMLname.DifferentElement{2}.Attributes.attrib3 = "2"; s.XMLname.DifferentElement{2}.Attributes.attrib4 = "1"; s.XMLname.DifferentElement{2}.Text = "Even more text";

Please note that the following characters are substituted - by _dash_, : by _colon_ and . by _dot_

Written by W. Falkena, ASTI, TUDelft, 21-08-2010 by A. Wanner, 14-6-2011 Added CDATA support by I. Smirnov, 20-3-2012

Modified by X. Mo, University of Wisconsin, 12-5-2012

Referenced by getImageMetadata(), getXMLheader(), and readBigDataViewerFormat().

Here is the caller graph for this function: