summaryrefslogtreecommitdiff
path: root/Xerl
diff options
context:
space:
mode:
Diffstat (limited to 'Xerl')
-rw-r--r--Xerl/XML/Reader.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/Xerl/XML/Reader.pm b/Xerl/XML/Reader.pm
index c3ecbcd..96a8835 100644
--- a/Xerl/XML/Reader.pm
+++ b/Xerl/XML/Reader.pm
@@ -58,13 +58,13 @@ sub sax() {
);
$parser->parse_uri($self->get_path());
+
+ return $parser->{xerl}{root};
}
sub parse($) {
my Xerl::XML::Reader $self = $_[0];
- my $sax_result = $self->sax();
-
my $rarray = $self->get_array();
return $self unless ref $rarray eq 'ARRAY';
@@ -172,6 +172,17 @@ sub parse($) {
# $root->print();
$self->set_root($root);
+ use Data::Dumper;
+ open my $foo, '>', '/tmp/root.old';
+ print $foo (Dumper $root);
+ close $foo;
+
+ my $root = $self->sax();
+ open $foo, '>', '/tmp/root.new';
+ print $foo (Dumper $root);
+ close $foo;
+
+
return undef;
}