MatrixBerryCore
Namespaces | Functions
mxberry::xml Namespace Reference

Namespaces

 test
 

Functions

function xmlformat (in SData, in attSwitch, in name, in level, in SMetaData)
 XMLFORMAT formats the variable V into a name-based tag XML string xstr. More...
 
function getClass (in inpVal)
 
function getIsNotRow (in inpArray)
 
function mynum2str (in aVec)
 
function charFuncSubstitute (in content)
 
function xmlload (in fileName)
 XMLLOAD loads XML file and converts it into Matlab structure or variable. More...
 
function xmlparse (in inpXmlString, in attSwitch, in SData, in level)
 XMLPARSE parses XML string str and returns matlab variable/structure. This is a non-validating parser! More...
 
function charFuncReSubstitute (in inpStr)
 
function getFindStr (in longStr, in shortStr)
 find positions of occurences of string str in longstr More...
 
function xmlsave (in fileName, in SData, in varargin)
 XMLSAVE saves structure or variable(s) to a file using XML format. More...
 

Function Documentation

◆ charFuncReSubstitute()

function mxberry::xml::charFuncReSubstitute ( in  inpStr)

◆ charFuncSubstitute()

function mxberry::xml::charFuncSubstitute ( in  content)

◆ getClass()

function mxberry::xml::getClass ( in  inpVal)

◆ getFindStr()

function mxberry::xml::getFindStr ( in  longStr,
in  shortStr 
)

find positions of occurences of string str in longstr

◆ getIsNotRow()

function mxberry::xml::getIsNotRow ( in  inpArray)

◆ mynum2str()

function mxberry::xml::mynum2str ( in  aVec)

◆ xmlformat()

function mxberry::xml::xmlformat ( in  SData,
in  attSwitch,
in  name,
in  level,
in  SMetaData 
)

XMLFORMAT formats the variable V into a name-based tag XML string xstr.

*  Input:
*    regular:
*       SData: any[]/struct[] - Matlab variable or structure.
*             The data types we can deal with are:
*               char,numeric,complex,struct,sparse,cell,logical/boolean
*             Not handled are data types:
*               function_handle,single,intxx,uintxx,java objects
* 
*    optional:
*        attSwitch: char[1,]-   optional,'on'- writes attributes,
*            'off'- writes "plain" XML
*        name: char[1,] - optional,give root element a specific name,
*            eg. 'books'
*        level: double[1,1] -  internal,increases tab padding at
*            beginning of xstr
*        SMetaData: struct[1,1] - structure with meta information for
*            a root tag
* 
*  Output:
*    xstr: char[1,] - string,containing XML description of variable V
* 
Author
Peter Gagarinov,PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ xmlload()

function mxberry::xml::xmlload ( in  fileName)

XMLLOAD loads XML file and converts it into Matlab structure or variable.

*  Input:
*    regular:
*        file: char[1,] -  filename of xml file written with xmlsave
* 
*  Output:
*    SData: any/struct[1,1] - variable of arbitrary type/structure
*        loaded from xml file
*    SMetaData: struct[1,1] - structure containing a meta-infromation loaded
*        from the specified file at the root level
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ xmlparse()

function mxberry::xml::xmlparse ( in  inpXmlString,
in  attSwitch,
in  SData,
in  level 
)

XMLPARSE parses XML string str and returns matlab variable/structure. This is a non-validating parser!

*  Input:
*    regular:
*        inpXmlString: char[1,] -  xml string, possibly loaded from a file
*        via "xmlload"
* 
*    optional:
*        attSwitch: char[1,]  'on'- reads attributes, 'off'- ignores
*            attributes
*        SData: any/struct[] -  Variable which gets extended
*            or whose  substructure parameters get overridden by entries in
*            the string.
* 
*  Output:
* 
*    SData: any/struct[1,1] - matlab variable or structure
*    SMetaData structure with meta data stored in the root tag
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

◆ xmlsave()

function mxberry::xml::xmlsave ( in  fileName,
in  SData,
in  varargin 
)

XMLSAVE saves structure or variable(s) to a file using XML format.

*  Input:
*    regular:
*        fileName: char[1,] -     filename
*        SData: any[]/struct[], -   Matlab variable or structure to store
*            in file.
* 
*    optional:
*        attSwitch: char[1,]  - optional, 'on' stores XML type attributes (default),
*                 'off' doesn't store XML type attributes
*        SMetaData: struct[1,1] - structure containing a meta information
*            to be stored in the  resulting xml file, empty by default
* 
*    properties:
*        isTsInserted: logical[1,1] when false, timestamp is not recorded
*           into resulting xml file, true by default
* 
*  Output:
*    none:
* 
Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om