annotate toolboxes/xml_toolbox/xml_formatany.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 %XML_FORMATANY Formats a matlab variable into an XML string.
Daniel@0 2 %
Daniel@0 3 % SYNTAX
Daniel@0 4 % xmlstr = xml_formatany(V)
Daniel@0 5 % xmlstr = xml_formatany(V, rootname )
Daniel@0 6 %
Daniel@0 7 % INPUT
Daniel@0 8 % V Matlab variable or structure.
Daniel@0 9 % The data types we can deal with are:
Daniel@0 10 % char, numeric, complex, struct, sparse, cell, logical/boolean
Daniel@0 11 % -> struct fields named ATTRIBUTE (user-definable) get converted into XML attribute
Daniel@0 12 % Not handled are data types:
Daniel@0 13 % function_handle, single, intxx, uintxx, java objects
Daniel@0 14 %
Daniel@0 15 % rootname optional, give root element a specific name, eg. 'books'
Daniel@0 16 %
Daniel@0 17 % OUTPUT
Daniel@0 18 % xmlstr string, containing XML description of variable V
Daniel@0 19 %
Daniel@0 20 % SPECIAL FIELDNAMES
Daniel@0 21 % .ATTRIBUTE. define additional attributes by using subfields, eg V.ATTRIBUTE.type='mydbtype'
Daniel@0 22 % .CONTENT define content if attribute field given (all capitals)
Daniel@0 23 % .ATTRIBUTE.NAMESPACE define namespace (all capitals)
Daniel@0 24 % .ATTRIBUTE.TAGNAME define element tag name (if not an allowed Matlab fieldname in struct) e.g.: v.any.ATTRIBUTE.TAGNAME = 'xml-gherkin'
Daniel@0 25 %
Daniel@0 26 % SEE ALSO
Daniel@0 27 % xml_help, xml_parse, xml_parseany, xml_load, xml_save, (xmlread, xmlwrite)
Daniel@0 28
Daniel@0 29 % Copyright (C) 2002-2005, University of Southampton
Daniel@0 30 % Author: Dr Marc Molinari <m.molinari@soton.ac.uk>
Daniel@0 31 % $Revision: 1.1 $ $Date: 2005/04/15 17:12:14 $ $Tag$
Daniel@0 32