src/Sulu/Component/Util/XmlUtil.php
public static function getValueFromXPath($path, \DOMXPath $xpath, \DomNode $context = null, $default = null)
    {
        $result = $xpath->query($path, $context);
        if (0 === $result->length) {
            return $default;
        }

        $item = $result->item(0);
        if (null === $item) {
            return $default;
        }

        return $item->nodeValue;
    }
public static function getValueFromXPath($path, \DOMXPath $xpath, \DomNode $context = null, $default = null)
    {
        $result = $xpath->query($path, $context);
        if (0 === $result->length) {
            return $default;
        }

        $item = $result->item(0);
        if (null === $item) {
            return $default;
        }

        return $item->nodeValue;
    }
public static function getValueFromXPath ( $ path , \ DOMXPath $ xpath , \ DomNode $ context = null , $ default = null ) { $ result = $ xpath -> query ( $ path , $ context ) ; if ( 0 === $ result -> length ) { return $ default ; } $ item = $ result -> item ( 0 ) ; if ( null === $ item ) { return $ default ; } return $ item -> nodeValue ; }
Returns value of path.

@param string $path
@param \DOMXPath $xpath
@param \DomNode $context
@param mixed $default

@return bool|null|string|mixed
Returns value of path .