DOM DOMElement::setAttributeNodeNS
(PHP 5, PHP 7, PHP 8)
DOMElement::setAttributeNodeNS — 요소에 새 속성 노드를 추가합니다.
설명
public DOMElement::setAttributeNodeNS(DOMAttr $attr
): DOMAttr|null|false
요소에 새 속성 노드 attr
을 추가합니다.
매개변수
attr
- 속성 노드.
반환 값
속성이 교체된 경우 이전 노드를 반환합니다.
오류/예외
DOM_NO_MODIFICATION_ALLOWED_ERR
- 노드가 읽기 전용이면 발생합니다.
기타
- DOMElement::hasAttributeNS() - 속성이 존재하는지 확인
- DOMElement::getAttributeNodeNS() - 속성 노드를 반환합니다.
- DOMElement::removeAttributeNode() - 속성 제거