Skip to content

Commit 2f10e63

Browse files
改行とインデントを原文と揃える
1 parent fa35af6 commit 2f10e63

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

reference/dom/domxpath/quote.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,22 @@
4848
<example>
4949
<title>引用符付きの属性の変換</title>
5050
<programlisting role="php">
51-
<![CDATA[
51+
<![CDATA[
5252
<?php
5353
$doc = new DOMDocument;
5454
$doc->loadXML(<<<XML
5555
<books>
5656
<book name="'quoted' name">Book title</book>
5757
</books>
5858
XML);
59+
5960
$xpath = new DOMXPath($doc);
61+
6062
$query = "//book[@name=" . DOMXPath::quote("'quoted' name") . "]";
6163
echo $query, "\n";
64+
6265
$entries = $xpath->query($query);
66+
6367
foreach ($entries as $entry) {
6468
echo "Found ", $entry->textContent, "\n";
6569
}
@@ -68,7 +72,7 @@ foreach ($entries as $entry) {
6872
</programlisting>
6973
&example.outputs;
7074
<screen>
71-
<![CDATA[
75+
<![CDATA[
7276
//book[@name="'quoted' name"]
7377
Found Book title
7478
]]>
@@ -77,15 +81,15 @@ Found Book title
7781
引用符が混在している文字列もサポートします:
7882
</simpara>
7983
<programlisting role="php">
80-
<![CDATA[
84+
<![CDATA[
8185
<?php
8286
echo DOMXPath::quote("'different' \"quote\" styles");
8387
?>
8488
]]>
8589
</programlisting>
8690
&example.outputs;
8791
<screen>
88-
<![CDATA[
92+
<![CDATA[
8993
concat("'different' ",'"quote" styles')
9094
]]>
9195
</screen>
@@ -121,4 +125,4 @@ End:
121125
vim600: syn=xml fen fdm=syntax fdl=2 si
122126
vim: et tw=78 syn=sgml
123127
vi: ts=1 sw=1
124-
-->
128+
-->

0 commit comments

Comments
 (0)