I have some elements in my xml that are empty but have attributes.
I would like that I can group the element in function of Attribute Name.
<Layout Class="Parameter" ID="r060116_103344354_000026"
Status="Available">
<LayerList>
<LayerDetails Name="nl-BE"/>
<LayerDetails Name="fr-BE"/>
<LayerDetails Name="nl-NL"/>
</LayerList>
</Layout>
I read in I get
$VAR1 = {
'ID' => 'r060116_103344354_000026',
'Status' => 'Available',
'LayerList' => {
'LayerDetails' => [
{
'Name' => 'nl-BE'
},
{
'Name' => 'fr-BE'
},
{
'Name' => 'nl-NL'
}
]
},
'Class' => 'Parameter'
};
I would like it when the xml is readed in to became
{
'ID' => 'r060116_103344354_000026',
'Status' => 'Available',
'LayerList' => {
'LayerDetails' => [ 'nl-BE', 'fr-BE', 'nl-
NL' ]
},
'Class' => 'Parameter'
}
}
I've tried to use
# KeyAttr => [ list ]
# KeyAttr => { list }
# GroupTags => { grouping tag => grouped tag }
even an combination of KeyAttri and GroupTags but don't get the
desired output
Thanks Bjorn