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

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