src/Services/Utils/XmlParser.php
public function parse($xml, array $pluralizationRules = array())
    {
        $parsedXml = json_decode(json_encode(new \SimpleXMLElement($xml)), true);

        return $this->pluralize($parsedXml, $pluralizationRules);
    }
public function parse($xml, array $pluralizationRules = array())
    {
        $parsedXml = json_decode(json_encode(new \SimpleXMLElement($xml)), true);

        return $this->pluralize($parsedXml, $pluralizationRules);
    }
Parses xml according to pluralization rules.

@param string  $xml                The xml.
@param array   $pluralizationRules The pluralization rules.

@return \stdClass The parsed & pluralized xml.