a missing word + some CS (no, I'm not an addict)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@150640 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2004-02-06 17:39:57 +00:00
parent fd28c3c371
commit 9ff471e9ac

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<reference id="ref.simplexml">
<title>SimpleXML functions</title>
<titleabbrev>SimpleXML</titleabbrev>
@ -100,8 +100,8 @@ include 'example.php';
$xml = simplexml_load_string($xmlstr);
/* For each <movie> node, we echo a separate <plot>. */
foreach($xml->movie as $movie) {
echo $movie->plot,'<br/>';
foreach ($xml->movie as $movie) {
echo $movie->plot, '<br />';
}
?>
@ -115,8 +115,8 @@ foreach($xml->movie as $movie) {
<simpara>
So far, we have only covered the work of reading element names
and their values. SimpleXML can also access element attributes.
Access attributes of an element just as you would elements of
an <type>array</type>.
Access attributes of an element just as you would access elements
of an <type>array</type>.
</simpara>
<programlisting role="php">
<![CDATA[
@ -155,8 +155,8 @@ foreach ($xml->movie[0]->rating as $rating) {
include 'example.php';
$xml = simplexml_load_string($xmlstr);
foreach($xml->xpath('//character') as $character) {
echo $character->name, 'played by ', $character->actor, '<br/>';
foreach ($xml->xpath('//character') as $character) {
echo $character->name, 'played by ', $character->actor, '<br />';
}
?>
]]>