Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Thanks Pijo for help..!! It was working perfect if we take Array reference and multiple attributes present in the same file. But this is failing only one attribute is present in the file.. it says not an array reference.Below is my xml data dumper o/p.
$VAR1 = { 'cdr' => { 'networkInfo' => { 'extPayer' => '13000', 'ggsnAddress' => '172.26.33.44', 'instanceId' => '0', 'imei' => '0', 'networkUsageIdentifier' => '172.2 +6.33.44', 'ReleaseCause' => '00144', 'spendControlId' => '0', 'defaultPayer' => '13000', 'gprsLocationInfo' => '0130120857' +, 'sessionId' => '151014195900000010 +1', 'errorCode' => '0', 'requestType' => '1001', 'timeZone' => '', 'ccRequestType' => '3', 'defaultExtPayer' => '13000', 'sgsnAddress' => '172.26.33.44', 'gprsLBC' => '0', 'gprsApn' => 'tecnotree.com', 'connectionType' => '0', 'gprsAttributes' => '', 'eventDateTime' => '20151014195959 +', 'imsiMccMnc' => '724110000000069', 'sequenceNumber' => '0', 'unitType' => '2', 'holidayCode' => '0', 'serviceIdentifier' => '0', 'ratingGroup' => '1029', 'pdpType' => '0', 'pdpAddress' => '172.26.33.44', 'sgsnMccMnc' => '', 'specialLocationClassId' => '0', 'eventType' => '0', 'payerType' => '0', 'connectionId' => '005029740902190 +', 'payer' => '13000', 'cgAddress' => '', 'redirectionCode' => '0', 'callReferenceNumber' => '11499269 +2', 'ggsnMccMnc' => '', 'mvnoId' => '3', 'originatingNetworkId' => '1081', 'chargingId' => '114992692', 'actionDateTime' => '2015101419595 +9', 'tariffToken' => '0', 'callTerminationCause' => '1', 'exponent' => '-6' }, 'payerInfo' => { 'newPayerStatus' => '2', 'noOfPayerValidity' => '0', 'prevPayerStatus' => '2', 'walletDetails' => { 'walletId' => '1' +, 'prevWalletBalanc +e' => '9856000000000', 'prevExpiryDate' +=> '20151202', 'expiryFlag' => ' +0', 'newWalletBalance +' => '9854000000000', 'newExpiryDate' = +> '20151202' }, 'noOfWalletsUsed' => '1', 'baseWalletBalance' => '985400000000 +0' }, 'pricedInfo' => { 'totalUsedUnits' => '2000', 'totalCostPrice' => '2000000000', 'bucket' => { 'rateId' => '1347', 'discountPercentage' => + '0', 'startUnits' => '1', 'exchangeRate' => '1000 +000', 'taxFormulaId' => '1002 +', 'componentId' => '0', 'taxWalletId' => '1', 'currencyRateId' => '1' +, 'discountArticleId' => +'1001', 'walletId' => '1', 'salePrice' => '2000000 +000', 'discountAmount' => '0' +, 'TaxDetail' => { 'Tax' => + { + 'amount' => '0', + 'count' => '1', + 'article' => '1009' } }, 'usedUnits' => '2000', 'endUnits' => '2000', 'taxApplied' => '0', 'debitedValue' => '2000 +000000', 'costPrice' => '2000000 +000', 'dimensionId' => '0', 'serviceKey' => '0', 'chargeArticleId' => '1 +', 'tariffId' => '1422' }, 'taxingOptionUsed' => '0', 'totalTax' => '0', 'totalSalePrice' => '2000000000', 'chargeSummary' => { 'dimensionSummar +y' => { + 'dimensionId' => '0', + 'componentSummary' => { + 'totalSalePrice' => '2000000000', + 'totalCostPrice' => '2000000000', + 'componentId' => '0', + 'totalDiscountAmount' => '0', + 'bucketsUsed' => '1' + } + } }, 'bucketsUsed' => '1', 'totalDiscountAmount' => '0' } } };

In reply to Re^4: Perl : How to retrieve from xml when xml file having same attribute multiple time by bhushanQA
in thread Perl : How to retrieve from xml when xml file having same attribute multiple time by bhushanQA

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2021-09-23 12:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?