use strict; use warnings; use Data::Dump qw/dump/; use XML::Smart; my $xml = qq{
192.168.2.102
}; my $obj = XML::Smart->new($xml); print dump $obj; my $h = $obj->tree_ok; print dump $h; __END__ do { my $a = bless(do{\(my $o = bless({ TIEONUSE => { a => "XML::Smart::Tie::Array", h => "XML::Smart::Tie::Hash" }, a => [], b => \sub { "???" }, c => sub { "???" }, g => \*Object::MultiType::Saver::NULL, h => {}, point => { "/nodes" => { hosts => 1 }, "/order" => ["hosts"], hosts => { "/nodes" => { server => 1 }, server => { "/nodes" => { address => 1 }, "/order" => ["os", "type", "version", "address"], address => { CONTENT => "192.168.2.102" }, os => "linux", type => "conectiva", version => "9.0", }, }, }, "s" => \sub { "???" }, tree => 'fix', }, "Object::MultiType::Saver"))}, "XML::Smart"); $$a->{tree} = $$a->{point}; $a; } { hosts => { server => { address => { CONTENT => "192.168.2.102" }, os => "linux", type => "conectiva", version => "9.0", }, }, }