in reply to Re: Re: Need Help Understanding Parsing XML into multi level struck
in thread Need Help Understanding Parsing XML into multi level struck

When you use the Data::Dumper module, does your overall structure look like you think it should? For example, do you get the expected output when you say:
print Dumper $tree;

Dave

  • Comment on Re: Re: Re: Need Help Understanding Parsing XML into multi level struck
  • Download Code

Replies are listed 'Best First'.
Re: Re: Re: Re: Need Help Understanding Parsing XML into multi level struck
by ralibm (Acolyte) on Mar 17, 2004 at 23:53 UTC
    This is the result after the looping.

    print Dumper($self);
    $VAR1 = bless( { 'TradingStatistics::SharesOutstandingTotal' => bless( + { 'SubFields::content' => undef, 'SubFields::Description' => undef, 'SubFields::Type' => undef, 'SubFields::modDate' => undef }, 'SubFields' ), 'TradingStatistics::ShortInterestRatio' => bless( { 'SubFields::content' => undef, 'SubFields::Description' => undef, 'SubFields::Type' => undef, 'SubFields::modDate' => undef .........
    Here's the tree slightly scrubed.

    print Dumper($tree);
    $VAR1 = { 'TradingStatisticsIRMXL' => { 'TradingStatistics' => { 'HalfYearChange' => {}, 'InstitutionsHoldingShares' => {}, 'YearChange' => {}, ..... $VAR1 = { 'CorpMasterID' => '', 'TradingStatisticsIRXML' => { 'TradingStatistics' => { 'HalfYearChange' => { 'Description' => '26-Week Price Percent Change', 'content' => ', 'Type' => 'PriceAndVolume' }, 'InstitutionsHoldingShares' => { 'Description' => 'Institutions Holding Shares', 'content' 'Type' => 'InstitutionalHoldings' ..... },
    As you can see there's a new hash inserted into the top of the tree that looks like the struct that I'm trying to build but without data, and the struct doesn't contaiin any either.

    This is where I'm at a loss since my previou module is almost a duplicate except that it use a single level struct, with one loop.