in reply to XMLout and keys/attributes
Remove the ContentKey option from your call to XMLout and change where you set $XmlRef to the following:
Update: No, that's not right... you have two tags, so you have to push them on... Try this:
$XmlRef->{$keyname}{'devices'}{'dev'.$cnt}{'param'} = []; for my $foo(keys %{$userref->{$key}{'hash'}}) { push @{ $XmlRef->{$keyname}{'devices'}{'dev'.$cnt}{'param'} } , {id => $foo, content => $userref->{$key}{'hash'}{$foo}} ; $i+=1; }
Edit: struck out incorrect code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XMLout and keys/attributes
by atreyu (Sexton) on May 09, 2012 at 15:29 UTC | |
by sauoq (Abbot) on May 09, 2012 at 15:32 UTC | |
by atreyu (Sexton) on May 09, 2012 at 15:39 UTC | |
by sauoq (Abbot) on May 09, 2012 at 16:14 UTC |