Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: how could i captured selected data of the input ?

by dimar (Curate)
on Nov 09, 2006 at 14:06 UTC ( #583107=note: print w/ replies, xml ) Need Help??

in reply to how could i captured selected data of the input ?

In addition to the modules suggested in previous posts, you probably also want to take a look at how you are handling the raw data (assuming it really is XML, and not just a deceptively similar analogue) after you have loaded it. It looks like you are loading a simple table structure, so all you need to do is treat your data like a table in your code. There are modules that will help you do that as well (see e.g., DBD-AnyData). Hence, to directly answer your questions here is a psuedo-code example:

my $oTable = XML::Simple::XMLin($sFile); print $oTable->[1]; ## 1. print second record only print $oTable->[1]{chargeableduration}; ## 2. do that
This is pseudo-code because it ignores the real code needed to fulfill these assumptions: 1) you easily loaded your XML into an AoH; 2) you know the code to print out the second record is actually a bit more involved if you want some useful output; 3) you know the difference between an AoH and an AoA. If these assumptions are beyond your familiarity, have a shot at supersearch and let the learning begin.


Comment on Re: how could i captured selected data of the input ?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://583107]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-11-27 07:50 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (719 votes), past polls