DOMDocument::createAttributeNS

编辑

(PHP 5, PHP 7)

DOMDocument::createAttributeNS — Create new attribute node with an associated namespace  


PHP中文网词条详解说明

public DOMAttr DOMDocument::createAttributeNS ( string $namespaceURI , string $qualifiedName )

This function creates a new instance of class DOMAttr. 此节点出现在文档中,除非是用诸如 DOMNode->appendChild() 等函数来将其插入。  


PHP中文网词条详解参数

namespaceURI

命名空间的URI。

qualifiedName

该标签的名称和前缀的前缀属性,tagname:


PHP中文网词条详解返回值

The new DOMAttr or FALSE if an error occurred. 


PHP中文网词条详解错误/异常

DOM_INVALID_CHARACTER_ERR

Raised if qualifiedName contains an invalid character.

DOM_NAMESPACE_ERR

Raised if qualifiedName is a malformed qualified name, or if qualifiedName has a prefix and namespaceURI is NULL

        

PHP中文网词条详解参见

DOMNode::appendChild() - Adds new child at the end of the children


参考资料
词条标签:
PHP   createAttributeNS   phpDOMDocument