Lines Matching refs:title
14 * <title>This is the title</title>
16 * Calculate the number of title text nodes (1).
17 * Add another text node to title. Calculate the number of title text nodes (2).
18 * Normalize author. Calculate the number of title text nodes (2).
19 * Normalize title. Calculate the number of title text nodes (1).
27 $title = $doc->createElement('title');
28 $root->appendChild($title);
33 $text = $doc->createTextNode('This is the first title');
34 $title->appendChild($text);
36 echo "Number of child nodes of title = ";
37 var_dump($title->childNodes->length);
39 // add a second text node to title
40 $text = $doc->createTextNode('This is the second title');
41 $title->appendChild($text);
43 echo "Number of child nodes of title after adding second title = ";
44 var_dump($title->childNodes->length);
49 echo "Number of child nodes of title after normalizing author = ";
50 var_dump($title->childNodes->length);
53 // should concatenate first and second title text nodes
54 $title->normalize();
56 echo "Number of child nodes of title after normalizing title = ";
57 var_dump($title->childNodes->length);
61 Number of child nodes of title = int(1)
62 Number of child nodes of title after adding second title = int(2)
63 Number of child nodes of title after normalizing author = int(2)
64 Number of child nodes of title after normalizing title = int(1)