http://www.perlmonks.org?node_id=810120


in reply to XML::Smart blessed object

See tree_ok
use strict; use warnings; use Data::Dump qw/dump/; use XML::Smart; my $xml = qq{ <hosts> <server os="linux" type="conectiva" version="9.0"> <address>192.168.2.102</address> </server> </hosts> }; 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", "vers +ion", "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", }, }, }

Replies are listed 'Best First'.
Re^2: XML::Smart blessed object
by Jenda (Abbot) on Nov 30, 2009 at 14:10 UTC