Integrate user note 103376

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350603 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Christoph Michael Becker 2020-09-20 14:38:25 +00:00
parent f234b82635
commit 5b39b84a3b

View file

@ -48,6 +48,34 @@
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example xml:id="xmlwriter-start-attribute.example.basic">
<title>Basic <methodname>XMLWriter::startAttribute</methodname> Usage</title>
<programlisting role="php">
<![CDATA[
<?php
$writer = new XMLWriter;
$writer->openURI('php://output');
$writer->startDocument('1.0', 'UTF-8');?>
$writer->startElement('element');
$writer->startAttribute('attribute');
$writer->text('value');
$writer->endAttribute();
$writer->endElement();
$writer->endDocument();
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<element attribute="value"/>
]]>
</screen>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>