use strict;

my $t = TestX->new(ConfigFile => $ARGV[0]);

exit(0);

package TestX;

use XML::LibXML;
use XML::LibXML::XPathContext;

use constant DefaultConfigFile => 'test.xml';

# Constructor
sub new()
{
	my $this = shift;
	my $class = ref($this) || $this;
	my $self = {};
	bless $self, $class;
	$self->initialize(@_);
	return $self;
};

# setup defaults
sub initialize()
{
	my $self = shift;
	my %op = (
		ConfigFile => DefaultConfigFile,
		@_
	);
	
	my $parser = XML::LibXML->new();
	my $doc = $parser->parse_file( $op{ConfigFile} )
	  	or die "Failed to read config file $!: ".$parser->get_last_error()."\n";
	my $xc = XML::LibXML::XPathContext->new($doc->documentElement());
	print $xc->findnodes('/builds/database/user')->[0]->toString(),$/;

#	$self->{document} = $doc;
};

1;

