Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: XML::Smart blessed object

by keszler (Priest)
on Nov 30, 2009 at 10:53 UTC ( #810120=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://810120]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2019-02-17 00:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I use postfix dereferencing ...









    Results (95 votes). Check out past polls.

    Notices?