You are here: Re: Extracting body from HTML document? « PHP Programming Language « IT news, forums, messages
Re: Extracting body from HTML document?

Posted by Andre-John Mas on 11/14/07 22:46

On Nov 14, 4:54 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
>
> http://www.php.net/dom
>
> <?php
> $doc = new DOMDocument();
> $doc->loadHTMLFile('test.html');
>
> //just by tagname:
> $title= $doc->getElementsByTagName('title')->item(0);
>
> //or XPATH
> $xpath = new DOMXPath($doc);
> $tables = $xpath->query('//table');
> ?>
> --
> Rik Wasmus


Thanks for the answer, though I am not sure how go from here to having
a sub-section of the HTML text. Basically what I am wanting to do is
extract the body section of an HTML document, to be able to insert it
into another.

Andre

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация