public static function parseExpressionXml(SimpleXMLElement $xml){
        $returnValue = self::parseElementXml($xml);
        $value = trim($xml);
        $expressions = array();
        foreach($xml->children() as $child){
            $expressions[] = self::parseExpressionXml($child);
        }
        if(count($expressions)){
            $returnValue['expressions'] = $expressions;
        }
        if(strlen($value)){
            $returnValue['value'] = $value;
        }
        return $returnValue;
    }
public static function parseExpressionXml(SimpleXMLElement $xml){
        $returnValue = self::parseElementXml($xml);
        $value = trim($xml);
        $expressions = array();
        foreach($xml->children() as $child){
            $expressions[] = self::parseExpressionXml($child);
        }
        if(count($expressions)){
            $returnValue['expressions'] = $expressions;
        }
        if(strlen($value)){
            $returnValue['value'] = $value;
        }
        return $returnValue;
    }
public static function parseExpressionXml ( SimpleXMLElement $ xml ) { $ returnValue = self :: parseElementXml ( $ xml ) ; $ value = trim ( $ xml ) ; $ expressions = array ( ) ; foreach ( $ xml -> children ( ) as $ child ) { $ expressions [ ] = self :: parseExpressionXml ( $ child ) ; } if ( count ( $ expressions ) ) { $ returnValue [ 'expressions' ] = $ expressions ; } if ( strlen ( $ value ) ) { $ returnValue [ 'value' ] = $ value ; } return $ returnValue ; }
Parse a QTI expression node into an array

@see http://www.imsglobal.org/question/qtiv2p1/imsqti_infov2p1.html#element10569
@param SimpleXMLElement $xml
@return array
Parse a QTI expression node into an array