开发者

PHP Simple HTML DOM Parser denies to handle [invalid] HTML - first trial fails

g day dear community - hello all!

well I am trying to select either a class or an id using PHP Simple HTML DOM Parser with absolutely no luck. Perhaps i have to study the manpages again and again.

Well - the DOM-technique somewhat goes over my head: But my example is very simple and seems to comply to the examples given in the manual (simplehtmldom.sourceforge AT net/manual.htm) but it just wont work, it's driving me up the wall. Other example scripts given with simple dom work fine.

See the example: http://www.aktive-buergerschaft.de/buergerstiftungsfinder

This is the easiest example i have found ... The question is - how to parse it?

Should i do it with Perl - The example HTML page is invalid HTML. I do not know if the Simple HTML DOM Parser is able to handle badly malformed HTML (probably not). And then i am lost.

Well: it is pretty开发者_如何学编程 hard to believe - but you can get the content with file_get_contents: But you afterwards have to do the parser job! And there i have some missing parts!

Finally: if i cannot get it to run i can try out some Perl parsers eg HTML::TreeBuilder::XPath


1: check whether file_get_contents is working!!!!

2: If no use curl or fopen or telnet to read the data.

Simple Html Dom filters all the noise can process malformed tags also...

Problem might be with your data retrieving

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜