DOM DOMElement::removeAttributeNode
(PHP 5, PHP 7, PHP 8)
DOMElement::removeAttributeNode — 속성 제거
설명
public DOMElement::removeAttributeNode(DOMAttr $attr
): DOMAttr|false
요소에서 속성 attr
을 제거합니다.
매개변수
attr
- 속성 노드.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
오류/예외
DOM_NO_MODIFICATION_ALLOWED_ERR
- 노드가 읽기 전용이면 발생합니다.
DOM_NOT_FOUND_ERROR
attr
이 요소의 속성이 아니면 발생합니다.
기타
- DOMElement::hasAttribute() - 속성이 존재하는지 확인
- DOMElement::getAttributeNode() - 속성 노드를 반환합니다.
- DOMElement::setAttributeNode() - 요소에 새 속성 노드를 추가합니다.