<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Write full element tag</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.xmlwriter-write-element-ns.html">XMLWriter::writeElementNS</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xmlwriter-write-pi.html">XMLWriter::writePI</a></div> <div class="up"><a href="ref.xmlwriter.html">XMLWriter Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.xmlwriter-write-element" class="refentry"> <div class="refnamediv"> <h1 class="refname">XMLWriter::writeElement</h1> <h1 class="refname">xmlwriter_write_element</h1> <p class="verinfo">(PHP 5 >= 5.1.2, PECL xmlwriter >= 0.1.0)</p><p class="refpurpose"><span class="refname">XMLWriter::writeElement</span> -- <span class="refname">xmlwriter_write_element</span> — <span class="dc-title">Write full element tag</span></p> </div> <div class="refsect1 description" id="refsect1-function.xmlwriter-write-element-description"> <h3 class="title">Description</h3> <p class="para">Object oriented style</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>XMLWriter::writeElement</strong></span> ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$content</code></span> ] )</div> <p class="para rdfs-comment">Procedural style</p> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>xmlwriter_write_element</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$xmlwriter</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span> [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$content</code></span> ] )</div> <p class="para rdfs-comment"> Writes a full element tag. </p> </div> <div class="refsect1 parameters" id="refsect1-function.xmlwriter-write-element-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter"> xmlwriter</code></em></span><dd> <p class="para">Only for procedural calls. The XMLWriter <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span> that is being modified. This resource comes from a call to <span class="function"><a href="function.xmlwriter-open-uri.html" class="function">xmlwriter_open_uri()</a></span> or <span class="function"><a href="function.xmlwriter-open-memory.html" class="function">xmlwriter_open_memory()</a></span>.</p></dd> </dt> <dt> <span class="term"><em><code class="parameter">name</code></em></span> <dd> <p class="para"> The element name. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">content</code></em></span> <dd> <p class="para"> The element contents. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.xmlwriter-write-element-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 changelog" id="refsect1-function.xmlwriter-write-element-changelog"> <h3 class="title">Changelog</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>5.2.3</td> <td> The <em><code class="parameter">content</code></em> parameter became optional. </td> </tr> </tbody> </table> </p> </div> <div class="refsect1 seealso" id="refsect1-function.xmlwriter-write-element-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="function.xmlwriter-start-element.html" class="methodname" rel="rdfs-seeAlso">XMLWriter::startElement()</a> - Create start element tag</span></li> <li class="member"> <span class="methodname"><a href="function.xmlwriter-end-element.html" class="methodname" rel="rdfs-seeAlso">XMLWriter::endElement()</a> - End current element</span></li> <li class="member"> <span class="methodname"><a href="function.xmlwriter-write-element-ns.html" class="methodname" rel="rdfs-seeAlso">XMLWriter::writeElementNS()</a> - Write full namespaced element tag</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.xmlwriter-write-element-ns.html">XMLWriter::writeElementNS</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xmlwriter-write-pi.html">XMLWriter::writePI</a></div> <div class="up"><a href="ref.xmlwriter.html">XMLWriter Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>