Converts an object to an XML string. The root element name is passed in as
a parameter, and each field of the object becomes a child element. Array
values are represented by multiples instances of that element. Methods on
the object are ignored.
public ConvertObjectToXml ( mixed $object, string $rootElementName, boolean $useXsiType ) : string | ||
$object | mixed | the object to serialize |
$rootElementName | string | the name of the root element |
$useXsiType | boolean | whether the xsi:type will be added into XML tags when available |
return | string | the XML serialized string of the object |