<HTML ><HEAD ><TITLE >DomDocument->create_element_ns</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Manual de PHP" HREF="index.html"><LINK REL="UP" TITLE="Funciones de DOM XML" HREF="ref.domxml.html"><LINK REL="PREVIOUS" TITLE="DomDocument->create_comment" HREF="function.domdocument-create-comment.html"><LINK REL="NEXT" TITLE="DomDocument->create_element" HREF="function.domdocument-create-element.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual de PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.domdocument-create-comment.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.domdocument-create-element.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.DomDocument-create-element_ns" ></A >DomDocument->create_element_ns</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN15403" ></A ><P > (no version information, might be only in CVS)</P >DomDocument->create_element_ns -- Create new element node with an associated namespace </DIV ><DIV CLASS="refsect1" ><A NAME="AEN15406" ></A ><H2 >Description</H2 >object <B CLASS="methodname" >DomDocument->create_element_ns</B > ( string uri, string name [, string prefix])<BR ></BR ><P > This function returns a new instance of class <B CLASS="classname" >DomElement</B >. The tag name of the element is the value of the passed parameter <TT CLASS="parameter" ><I >name</I ></TT >. The URI of the namespace is the value of the passed parameter <TT CLASS="parameter" ><I >uri</I ></TT >. If there is already a namespace declaration with the same uri in the root-node of the document, the prefix of this is taken, otherwise it will take the one provided in the optional parameter <TT CLASS="parameter" ><I >prefix</I ></TT > or generate a random one. This node will not show up in the document unless it is inserted with e.g. <B CLASS="function" >domnode_append_child()</B >. </P ><P > The return value is <TT CLASS="constant" ><B >FALSE</B ></TT > if an error occured. </P ><P > See also <B CLASS="function" >domdocument_create_element_ns()</B >, <B CLASS="function" >domnode_add_namespace()</B >, <B CLASS="function" >domnode_set_namespace()</B >, <B CLASS="function" >domnode_append_child()</B >, <B CLASS="function" >domdocument_create_text()</B >, <B CLASS="function" >domdocument_create_comment()</B >, <B CLASS="function" >domdocument_create_attribute()</B >, <B CLASS="function" >domdocument_create_processing_instruction()</B >, <B CLASS="function" >domdocument_create_entity_reference()</B >, and <B CLASS="function" >domnode_insert_before()</B >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.domdocument-create-comment.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Inicio</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.domdocument-create-element.html" ACCESSKEY="N" >Siguiente</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >DomDocument->create_comment</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.domxml.html" ACCESSKEY="U" >Subir</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >DomDocument->create_element</TD ></TR ></TABLE ></DIV ></BODY ></HTML >