mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
f234b82635
commit
5b39b84a3b
1 changed files with 28 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue