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