92 |
ok $text4->whole_text, 'text1text3text4', 'whole_text [17]'; |
ok $text4->whole_text, 'text1text3text4', 'whole_text [17]'; |
93 |
} |
} |
94 |
|
|
95 |
|
## |CDATASection| |splitText| |
96 |
|
{ |
97 |
|
my $node = $doc->create_cdata_section ('abcdefg'); |
98 |
|
|
99 |
|
my $return = $node->split_text (3); |
100 |
|
|
101 |
|
ok $node->node_value, 'abc', 'split_text A [1]'; |
102 |
|
ok $return->node_type, 4, 'split_text B.node_type [1]'; |
103 |
|
ok $return->node_value, 'defg', 'split_text B [1]'; |
104 |
|
ok $return->parent_node, undef, 'split_text B.parent_node [1]'; |
105 |
|
|
106 |
|
$node->node_value ('abcdefg'); |
107 |
|
my $el = $doc->create_element ('e'); |
108 |
|
$el->append_child ($node); |
109 |
|
|
110 |
|
$return = $node->split_text (3); |
111 |
|
|
112 |
|
ok $node->node_value, 'abc', 'split_text A [2]'; |
113 |
|
ok $return->node_type, 4, 'split_text B.node_type [2]'; |
114 |
|
ok $return->node_value, 'defg', 'split_text B [2]'; |
115 |
|
ok $return->parent_node, $el, 'split_text B.parent_node [2]'; |
116 |
|
ok $return->previous_sibling, $node, 'split_text B.ps [2]'; |
117 |
|
} |
118 |
|
|
119 |
=head1 LICENSE |
=head1 LICENSE |
120 |
|
|
121 |
Copyright 2007 Wakaba <w@suika.fam.cx> |
Copyright 2007 Wakaba <w@suika.fam.cx> |