Hi all

I have a hash that I am trying to populate for XML::Simple

$fullXmlHash{$agentBookingSearch."BookRef_".$xmlData{'bookref'}} = \%xmlData;

This work perfectly and I get the info as so
<?xml version="1.0" standalone="yes" >
<opt>
  <ebkBookRef_100122>
    <booktime>17:20:58</booktime>
                etc
    <bookref>100122</bookref>
  </ebkBookRef_100122>
  <ebkBookRef_100243>
    <booktime>13:37:07</booktime>
    <billcode>B</billcode>
    <sellcur>ZAR</sellcur>
        etc

But now I need it to look like so

<?xml version="1.0" standalone="yes" >
<agentABC>
  <ebkBookRef_100122>
    <booktime>17:20:58</booktime>
                etc
    <bookref>100122</bookref>
  </ebkBookRef_100122>
  <ebkBookRef_100243>
    <booktime>13:37:07</booktime>
    <billcode>B</billcode>
    <sellcur>ZAR</sellcur>
        etc

I was hoping the following code will do the job

$fullXmlHash{$agentName}{$agentBookingSearch."BookRef_".$xmlData{'bookref'}} = \%xmlData;

But for some funny reason I still get the same output.

Would anyone have any idea or clue as to where im going wrong.

Kind Regards and thanks in advance
Brent Clark

P.s. My xml output is like so $xml->XMLout(\%fullXmlHash, noattr => 1,xmldecl => '<?xml version="1.0" standalone="yes" >');

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to