DomDocument->create_element_ns

(no version information, might be only in CVS)

DomDocument->create_element_ns --  関連する名前空間を持つ新規要素ノードを作成する

説明

domelement DomDocument->create_element_ns ( string uri, string name [, string prefix] )

この関数は DomElement クラスの新規インスタンスを返します。 要素のタグ名は渡されたパラメータ name の値です。 名前空間の URI は渡されたパラメータ uri の値です。文章のルートノードで同じ名前空間が URI がすでに宣言されている場合、その接頭辞が使用されます。 そうでない場合、オプションパラメータ prefix で与えられた接頭辞、もしくはランダムに設定された接頭辞が使用されます。 このノードは、domnode_append_child() などで挿入されない限り、ドキュメント内に現われません。

エラーが発生した場合、戻り値は FALSE です。

domdocument_create_element_ns(), domnode_add_namespace(), domnode_set_namespace(), domnode_append_child(), domdocument_create_text(), domdocument_create_comment(), domdocument_create_attribute(), domdocument_create_processing_instruction(), domdocument_create_entity_reference(), domnode_insert_before() も参照ください。