Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^5: Remove node information by searching tag element

by MidLifeXis (Monsignor)
on Nov 23, 2011 at 14:45 UTC ( #939673=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Remove node information by searching tag element
in thread remove node information by searching tag element.

Given your output data, the approach I provided will do the job. $key should be the 'number tag element'. Don't add the results if you have already seen the number.

This block of code illustrates the technique.

my @data = qw( a b 3 d a f b ); my %seen; for ( @data ) { print $_, "\n" unless $seen{$_}++; } __DATA__ a b 3 d f

You should be able to apply this technique to your problem space.

--MidLifeXis


Comment on Re^5: Remove node information by searching tag element
Select or Download Code
Re^6: Remove node information by searching tag element
by veerubiji (Sexton) on Nov 24, 2011 at 18:03 UTC

    hi I reeded total xml::libxml::reader; but how to extract specific element form resulting $info and how to compare this is repeated or not. please help me i am not able to implement.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2015-07-06 01:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls