mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
37cacb933c
commit
d09e59b888
1 changed files with 22 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
<reference id="ref.domxml">
|
||||
?> <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">
|
||||
<?php
|
||||
$xmlstr = "<?xml version='1.0' standalone='yes'?>
|
||||
$xmlstr = "<?xml version='1.0' standalone='yes'?>
|
||||
<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
|
||||
[ <!ENTITY sp \"spanish\">
|
||||
]>
|
||||
<!-- lsfj -->
|
||||
<!-- lsfj -->
|
||||
<chapter language='en'><title language='en'>Title</title>
|
||||
<para language='ge'>
|
||||
&sp;
|
||||
<!-- comment -->
|
||||
<!-- comment -->
|
||||
<informaltable language='&sp;'>
|
||||
<tgroup cols='3'>
|
||||
<tbody>
|
||||
|
@ -549,10 +549,10 @@ if(!$dom = xmldoc($xmlstr)) {
|
|||
exit;
|
||||
}
|
||||
|
||||
$root = $dom->root();
|
||||
$root = $dom->root();
|
||||
/* or $root = domxml_root($dom); */
|
||||
print_r($root);
|
||||
?>
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
@ -583,7 +583,7 @@ print_r($root);
|
|||
<para>
|
||||
<example>
|
||||
<title>Creating a simple HTML document header</title>
|
||||
<programlisting>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
$doc = new_xmldoc("1.0");
|
||||
$root = $doc->add_root("HTML");
|
||||
|
@ -701,15 +701,15 @@ echo $doc->dumpmem();
|
|||
the <function>set_attribute</function> function of the node class.
|
||||
<example>
|
||||
<title>Adding an attribute to an element</title>
|
||||
<programlisting>
|
||||
<programlisting role="php">
|
||||
<?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->add_root("HTML");
|
||||
$head = $root->new_child("HEAD", "");
|
||||
$head->new_child("TITLE", "Hier der Titel");
|
||||
$head->set_attribute("Language", "ge");
|
||||
echo $doc->dumpmem();
|
||||
?>
|
||||
</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">
|
||||
<?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->add_root("HTML");
|
||||
$head = $root->new_child("HEAD", "");
|
||||
$head->new_child("TITLE", "Hier der Titel");
|
||||
$head->set_attribute("Language", "ge");
|
||||
$children = $head->children()
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue