Perlbeginner1 has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear Community, howdy!
i have a document i need to parse it and spit out only this part of the table:

see http://schulnetz.nibis.de/db/schulen/schule.php?schulnr=67003&lschb=


How to i parse the stuff!? With perl or php? I like Perl... for its great capabilities. It has the power of doing things with ease -
Note i have the xpaths (see below) Sad that i cannot apply them on Simple DOM Parser since this Dom Parser does not work with Xpaths but with CSS-Selectors:
Well i want to get all the data with that are within the table that name is called class="fliess"
How to dump all the results?
BTW - thinking about the most elegant way, i think it is the most pretty way would be to do it with perl - So i can try it with HTML::TableExtract or....
Well what do you suggest - Which way to choose to do this very simple thing?

Look forward to hear from you!
pb1
see the xpaths - i think this is a good starting point for running table - extract:

Schule: /html/body/center/table/tbody/tr2/td1
Stasse: /html/body/center/table/tbody/tr3/td1
Ort: /html/body/center/table/tbody/tr4/td1
Tel: /html/body/center/table/tbody/tr5/td1
Schulgliederungen: /html/body/center/table/tbody/tr6/td1
Besonderheite: /html/body/center/table/tbody/tr7/td1
E-Mail: /html/body/center/table/tbody/tr8/td1
Schulnummer: /html/body/center/table/tbody/tr9/td1

... good starting points...
  • Comment on Parser-decision: running with Simple-Dom-Parser or a perl-module?

Replies are listed 'Best First'.
Re: Parser-decision: running with Simple-Dom-Parser or a perl-module?
by marto (Cardinal) on Dec 04, 2010 at 16:07 UTC

    See your previous post for links to all of the help you've been given (on this forum at least) parsing HTML previously.

Re: Parser-decision: running with Simple-Dom-Parser or a perl-module?
by Corion (Patriarch) on Dec 04, 2010 at 16:02 UTC

    Just use a parser that understands XPath. Or convert your CSS selectors to XPath expressions. It's not hard and there is HTML::Selector::XPath.

    Do note that all of these mean you will have to do some actual programming yourself instead of constantly coming back and asking us to write code for you.

Re: Parser-decision: running with Simple-Dom-Parser or a perl-module?
by Anonymous Monk on Dec 04, 2010 at 16:22 UTC
    Well what do you suggest

    All the things already suggested , get to work :)