get attribute value xpath php code example Example: php xpath attribute exact $xpath->evaluate('string(atom:link[@rel="alternate"]/@href)')