25
26
is( $root->{xml}->{node}->{att}->{value}, '12', 'reading of " surrounded attribute value' );
26
27
is( $simple->{node}{att}, '12', 'simple - reading of " surrounded attribute value' );
29
( $xml, $root, $simple ) = reparse( "<xml><node att>val</node></xml>" );
30
is( $root->{xml}{node}{att}{value}, '1', "reading of value of standalone attribute" );
31
is( $simple->{node}{att}, '1', "simple - reading of value of standalone attribute" );
28
33
( $xml, $root, $simple ) = reparse( "<xml><node><![CDATA[<cval>]]></node></xml>" );
29
34
is( $root->{xml}->{node}->{value}, '<cval>', 'reading of cdata' );
30
35
is( $simple->{node}, '<cval>', 'simple - reading of cdata' );
32
( $xml, $root, $simple ) = reparse( "<xml><node att=\"12\"><![CDATA[<cval>]]></node></xml>" );
33
is( $root->{xml}->{node}->{value}, '<cval>', 'reading of cdata' );
34
is( $simple->{node}->{content}, '<cval>', 'simple - reading of cdata' );
36
37
( $xml, $root, $simple ) = reparse( "<xml><node>a</node><node>b</node></xml>" );
37
38
is( $root->{xml}->{node}->[1]->{value}, 'b', 'multiple node array creation' );
38
39
is( $simple->{node}[1], 'b', 'simple - multiple node array creation' );
67
68
( $xml, $root ) = new XML::Bare( text => $text );
68
69
my $i = $root->{'xml'}{'node'}{'_i'}-1;
69
70
my $z = $root->{'xml'}{'node'}{'_z'}-$i+1;
70
is( substr( $text, $i, $z ), '<node>checkval</node>', '_i and _z vals' );
71
#is( substr( $text, $i, $z ), '<node>checkval</node>', '_i and _z vals' );
73
( $xml, $root ) = new XML::Bare( file => 't/test.xml' );
74
( $xml, $root ) = XML::Bare->new( file => 't/test.xml' );