code: protected function isAttributeSet(SimpleXmlElement $node, $name)
      {
          $attributes = $node->attributes();
  
          return isset($attributes[$name]);
      }
docs: Checks whether an attribute exist under a specific node.
  
  @param SimpleXMLElement $node The instance of SimpleXMLElement
  @param string           $name The name of attribute
  
  @return boolean