wolffd@0: %XML_FORMATANY Formats a matlab variable into an XML string. wolffd@0: % wolffd@0: % SYNTAX wolffd@0: % xmlstr = xml_formatany(V) wolffd@0: % xmlstr = xml_formatany(V, rootname ) wolffd@0: % wolffd@0: % INPUT wolffd@0: % V Matlab variable or structure. wolffd@0: % The data types we can deal with are: wolffd@0: % char, numeric, complex, struct, sparse, cell, logical/boolean wolffd@0: % -> struct fields named ATTRIBUTE (user-definable) get converted into XML attribute wolffd@0: % Not handled are data types: wolffd@0: % function_handle, single, intxx, uintxx, java objects wolffd@0: % wolffd@0: % rootname optional, give root element a specific name, eg. 'books' wolffd@0: % wolffd@0: % OUTPUT wolffd@0: % xmlstr string, containing XML description of variable V wolffd@0: % wolffd@0: % SPECIAL FIELDNAMES wolffd@0: % .ATTRIBUTE. define additional attributes by using subfields, eg V.ATTRIBUTE.type='mydbtype' wolffd@0: % .CONTENT define content if attribute field given (all capitals) wolffd@0: % .ATTRIBUTE.NAMESPACE define namespace (all capitals) wolffd@0: % .ATTRIBUTE.TAGNAME define element tag name (if not an allowed Matlab fieldname in struct) e.g.: v.any.ATTRIBUTE.TAGNAME = 'xml-gherkin' wolffd@0: % wolffd@0: % SEE ALSO wolffd@0: % xml_help, xml_parse, xml_parseany, xml_load, xml_save, (xmlread, xmlwrite) wolffd@0: wolffd@0: % Copyright (C) 2002-2005, University of Southampton wolffd@0: % Author: Dr Marc Molinari wolffd@0: % $Revision: 1.1 $ $Date: 2005/04/15 17:12:14 $ $Tag$ wolffd@0: