protected function decodeXml($body)
    {
        try {
            $xml = Xml::build($body, ['return' => 'domdocument', 'readFile' => false]);
            // We might not get child nodes if there are nested inline entities.
            if ((int)$xml->childNodes->length > 0) {
                return Xml::toArray($xml);
            }

            return [];
        } catch (XmlException $e) {
            return [];
        }
    }
protected function decodeXml($body)
    {
        try {
            $xml = Xml::build($body, ['return' => 'domdocument', 'readFile' => false]);
            // We might not get child nodes if there are nested inline entities.
            if ((int)$xml->childNodes->length > 0) {
                return Xml::toArray($xml);
            }

            return [];
        } catch (XmlException $e) {
            return [];
        }
    }
protected function decodeXml ( $ body ) { try { $ xml = Xml :: build ( $ body , [ 'return' => 'domdocument' , 'readFile' => false ] ) ; // We might not get child nodes if there are nested inline entities. if ( ( int ) $ xml -> childNodes -> length > 0 ) { return Xml :: toArray ( $ xml ) ; } return [ ] ; } catch ( XmlException $ e ) { return [ ] ; } }
Decode XML into an array.

@param string $body The request body to decode
@return array
Decode XML into an array .