Thread HTML file nach infos duchsuchen od. parsen?? (22 answers)
Opened by Gast at 2007-10-23 03:13

renee
 2007-10-23 12:26
#101219 #101219
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use strict;
use warnings;
use Web::Scraper;

my $html = q~<TR>
<TD align=right><INPUT type=checkbox CHECKED
value="1894.252474 from(948.133513,2+) title(Elution%20from%3a%20777FinneganScanNumber%3a%202607) query(520)"
name=QUE></TD>
<TD alig=right><TT><I><B>948.13&nbsp;&nbsp;</B></I></TT></TD> <TD align=right><TT><I><B>1894.25247&nbsp;&nbsp;</B></I></TT></TD>
<TD>23334455&nbsp;</TD>
<TD>&nbsp;</TD></TD></TR>~;

my $parser      = scraper {
    process 'input[type="checkbox"]', value => '@value';
};
my $result = $parser->scrape( $html );

print $result->{value};


Ausgabe:
Code: (dl )
1
2
3
4
C:\>scraper_test.pl
1894.252474 from(948.133513,2+) title(Elution%20from%3a%20777FinneganScanNumber%
3a%202607) query(520)
C:\>
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread HTML file nach infos duchsuchen od. parsen??