Added role to programlisting

turned ?> and -> to *>


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51720 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Damien Seguy 2001-07-18 12:57:28 +00:00
parent 37cacb933c
commit d09e59b888

View file

@ -1,4 +1,4 @@
<reference id="ref.domxml">
?&gt; <reference id="ref.domxml">
<title>DOM XML functions</title>
<titleabbrev>DOM XML</titleabbrev>
@ -520,17 +520,17 @@
prints it. The other root node -- the comment -- is not returned.
<example>
<title>Retrieving root element</title>
<programlisting>
<programlisting role="php">
&lt;?php
$xmlstr = "&lt;?xml version='1.0' standalone='yes'?>
$xmlstr = "&lt;?xml version='1.0' standalone='yes'?&gt;
&lt;!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
[ &lt;!ENTITY sp \"spanish\">
]>
&lt;!-- lsfj -->
&lt;!-- lsfj --&gt;
&lt;chapter language='en'>&lt;title language='en'>Title&lt;/title>
&lt;para language='ge'>
&amp;sp;
&lt;!-- comment -->
&lt;!-- comment --&gt;
&lt;informaltable language='&amp;sp;'>
&lt;tgroup cols='3'>
&lt;tbody>
@ -549,10 +549,10 @@ if(!$dom = xmldoc($xmlstr)) {
exit;
}
$root = $dom->root();
$root = $dom-&gt;root();
/* or $root = domxml_root($dom); */
print_r($root);
?>
?&gt;
</programlisting>
</example>
</para>
@ -583,7 +583,7 @@ print_r($root);
<para>
<example>
<title>Creating a simple HTML document header</title>
<programlisting>
<programlisting role="php">
&lt;?php
$doc = new_xmldoc("1.0");
$root = $doc-&gt;add_root("HTML");
@ -701,15 +701,15 @@ echo $doc-&gt;dumpmem();
the <function>set_attribute</function> function of the node class.
<example>
<title>Adding an attribute to an element</title>
<programlisting>
<programlisting role="php">
&lt;?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("HTML");
$head = $root->new_child("HEAD", "");
$head->new_child("TITLE", "Hier der Titel");
$head->set_attribute("Language", "ge");
echo $doc->dumpmem();
?>
$root = $doc-&gt;add_root("HTML");
$head = $root-&gt;new_child("HEAD", "");
$head-&gt;new_child("TITLE", "Hier der Titel");
$head-&gt;set_attribute("Language", "ge");
echo $doc-&gt;dumpmem();
?&gt;
</programlisting>
</example>
</para>
@ -741,15 +741,15 @@ echo $doc->dumpmem();
the TITLE element.
<example>
<title>Adding an attribute to an element</title>
<programlisting>
<programlisting role="php">
&lt;?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("HTML");
$head = $root->new_child("HEAD", "");
$head->new_child("TITLE", "Hier der Titel");
$head->set_attribute("Language", "ge");
$children = $head->children()
?>
$root = $doc-&gt;add_root("HTML");
$head = $root-&gt;new_child("HEAD", "");
$head-&gt;new_child("TITLE", "Hier der Titel");
$head-&gt;set_attribute("Language", "ge");
$children = $head-&gt;children()
?&gt;
</programlisting>
</example>
</para>