../pvss.htm menu.gif basics.gif

xmlrpcDecodeValue()

Re-converts an XmlRpc-coded string to a variable.

Synopsis

int xmlrpcDecodeValue(string res, anytype &value[, bool isUTF = false]);

Parameters

Return Value

The function returns 0 if it was executed successfully and -1 in case of errors.

Description

Re-converts an XmlRpc-coded string to a variable.

IconExample

#uses "CtrlXmlRpc"

 

main()

{

  dyn_int diArray = makeDynInt(5,4,3,2,1);

  string sXmlArray;

 

  //convert the Array to an XML String

  sXmlArray = convertMixedToXmlString(diArray);

  dyn_int diReturn;

 

  //convert the XML String to an Array

  diReturn = convertXmlStringToMixed(sXmlArray);

  DebugN("Data in Array: "+ diArray, "Data in XmlString: "+sXmlArray, "Data Result in Array: "+ diReturn);

}

 

mixed convertXmlStringToMixed(string sXmlData)

{

  //this function converts an XML String with data of mixed variable into a mixed variable

  mixed mxDataArray;

 

  //decode sXmlData String from XML to mixed

  xmlrpcDecodeValue(sXmlData, mxDataArray);

  return mxDataArray;

}

Member of

XML-RPC, Basics

Availability

CTRL

See also

xmlrpcEncodeValue()

 

Top Of Page

 

V 3.11
Copyright ETM professional control GmbH 2013 All Rights Reserved