XML-MATLAB Data Type Conversion - MATLAB & Simulink (original) (raw)

Main Content

MATLAB® SOAP functions automatically convert XML data types used in SOAP messages to and from MATLAB types (classes). The following table contains the XML type and the corresponding MATLAB type for scalar values used in a WSDL document.

XML Schema Type MATLAB Type Returned—Scalar
boolean logical
byte int8
unsignedByte uint8
short int16
unsignedShort uint16
int int32
unsignedInt uint32
long int64
unsignedLong uint64
float double
double double
string char vector
gYear, gMonth,gDay, gYearMonth,gMonthDay calendarDuration array
dateTime dateTime
date dateTime with Year,Month, Day fields undefined.
time dateTime with Hours,Minutes, Seconds fields undefined.
duration duration if no year, month or day calendarDuration otherwise
NOTATION,QName Character vector containing a legalQName
hexbinary,base64Binary N-by-1 vector ofuint8 representing byte values (0-255) of encoded data
decimal, integer,nonPositiveInteger,nonNegativeInteger,positiveInteger,negativeInteger double array

The following table contains the XML type and the corresponding MATLAB type for arrays.

XML Schema Type—Array MATLAB Type Returned—Array
array of string N-by-1 cell array of characters
array of any type N-by-1 vector of specified type
array of hexbinary,base64Binary Not supported