pQuery\DomNode::getAttributeNS PHP Method

getAttributeNS() public method

Gets namespace of attribute(s)
public getAttributeNS ( string | integer $attr, string $compare = 'name', boolean $case_sensitive = false ) : string | array
$attr string | integer Negative int to count from end
$compare string Find node using "namespace", "name" or "total"
$case_sensitive boolean Compare with case sensitivity
return string | array False if not found
    function getAttributeNS($attr, $compare = 'name', $case_sensitive = false)
    {
        $f = $this->findAttribute($attr, $compare, $case_sensitive);
        if (is_array($f) && $f) {
            if (count($f) === 1) {
                return $this->attributes[$f[0][0]];
            } else {
                $res = array();
                foreach ($f as $a) {
                    $res[] = $a[0];
                }
                return $res;
            }
        } else {
            return false;
        }
    }
DomNode