DOM DOMElement::getAttribute
(PHP 5, PHP 7, PHP 8)
DOMElement::getAttribute — 속성 값을 반환
설명
public DOMElement::getAttribute(string $qualifiedName
): string
현재 노드에 대한 이름이 qualifiedName
인 속성 값을 가져옵니다.
매개변수
qualifiedName
- 속성의 이름입니다.
반환 값
속성의 값 또는 지정된 자격이 부여된 이름을 가진 속성이 없는 경우 빈 문자열입니다.
기타
- DOMElement::hasAttribute() - 속성이 존재하는지 확인
- DOMElement::setAttribute() - 새 속성을 추가하거나 기존 속성을 수정합니다.
- DOMElement::removeAttribute() - 속성 제거