#!/usr/bin/perl use strict; use warnings; use XML::DOM; use Gtk2 qw(-init); use XMLNavigator; my $mainwindow = Gtk2::Window->new("toplevel"); my $hbox = Gtk2::HBox->new(); my $parser = XML::DOM::Parser->new(); my $nav = XMLNavigator->new(domdocument => $parser->parsefile($ARGV[0])); $hbox->add($nav); $mainwindow->add($hbox); $mainwindow->signal_connect( destroy => sub { Gtk2->main_quit; } ); $mainwindow->set_size_request(500, 500); $mainwindow->show_all(); Gtk2->main();