in reply to Re: XML::Simple, XMLOut() question
in thread XML::Simple, XMLOut() question

Thinking along the same lines. Means looping through the anon array of hashes returned by the query to extract a users favorites and adding the parent key 'item' to each, could work though will give it a try.

Replies are listed 'Best First'.
Re^3: XML::Simple, XMLOut() question
by samarzone (Pilgrim) on Dec 15, 2010 at 15:04 UTC

    You need not loop. Following would suffice

    $x->{user}->{favorites} = {item => $x->{user}->{favorites}};

    where $x is your original structure


    -- Regards - Samar
      Many thanks, that's done the trick.