/** * Parses and returns the value inside the specified XML element. * * @param SimpleXMLElement $containerXml * @return mixed */ public static function parseValueInside($containerXml) { $dictValue = $containerXml->children(Splunk_AtomFeed::NS_S)->dict; $listValue = $containerXml->children(Splunk_AtomFeed::NS_S)->list; if (Splunk_XmlUtil::elementExists($dictValue)) { return Splunk_AtomFeed::parseDict($dictValue); } else { if (Splunk_XmlUtil::elementExists($listValue)) { return Splunk_AtomFeed::parseList($listValue); } else { return Splunk_XmlUtil::getTextContent($containerXml); } } }