Lines Matching refs:title
12 * <title>This is the title</title>
14 * Calculate the number of title text nodes (1).
15 * Add another text node to title. Calculate the number of title text nodes (2).
16 * Normalize author. Calculate the number of title text nodes (2).
17 * Normalize title. Calculate the number of title text nodes (1).
25 $title = $doc->createElement('title');
26 $root->appendChild($title);
31 $text = $doc->createTextNode('This is the first title');
32 $title->appendChild($text);
34 echo "Number of child nodes of title = ";
35 var_dump($title->childNodes->length);
37 // add a second text node to title
38 $text = $doc->createTextNode('This is the second title');
39 $title->appendChild($text);
41 echo "Number of child nodes of title after adding second title = ";
42 var_dump($title->childNodes->length);
47 echo "Number of child nodes of title after normalizing author = ";
48 var_dump($title->childNodes->length);
51 // should concatenate first and second title text nodes
52 $title->normalize();
54 echo "Number of child nodes of title after normalizing title = ";
55 var_dump($title->childNodes->length);
59 Number of child nodes of title = int(1)
60 Number of child nodes of title after adding second title = int(2)
61 Number of child nodes of title after normalizing author = int(2)
62 Number of child nodes of title after normalizing title = int(1)